plz help me...make button using javascript

hello gyusi want to make button using javascript and i f press on it the make any dir which i needfor example:button =>if press on it they make any thing like this like button of fourm <b> any text</b> or <tt> </tt>