|
-
August 3rd, 2003, 07:55 PM
#1
Banned
Javascipt? Question
i have a text area and i want some buttons above it, when clicked, those buttons will insert stuff into the text area, ie: if u click a button called "Bold", it'll insert into the text area. Anyway i can do this?
-
August 12th, 2003, 10:18 PM
#2
It's a simple event handler. Here's a tutorial on this:
http://javascriptkit.com/javatutors/event1.shtml
And here is a working HTML editor in JS that is similar to what I think you want to do:
http://javascriptkit.com/script/cut59.shtml
<input type="button" value=" Bold " onClick="bold()">
<input type="button" value=" Italics "
onClick="italic()">
<input type="button" value=" Underline " onClick="underline()">
<input type="button" value=" Preformatted " onClick="pre()">
<input type="button" value=" Center " onClick="center()">
<input type="button" value=" Horizontal Bar " onClick="hbar()">
<input type="button" value=" Line Break " onClick="lbreak()">
<input type="button" value=" Paragraph Break" onClick="pbreak()">
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|