4
Contributors
7
Replies
10
Views
5 Years
Discussion Span
Last Post by Troy III
0
<!doctype native>
<html>
<head>
</head>
<body>
Font Size: <select id=fontSize>
             <option>10pt</option>
             <option>12pt</option>
             <option>14pt</option>
           </select>

Font Family: <select id=fontFamily>
               <option>Arial</option>
               <option>Verdana</option>
               <option>Georgia</option>
             </select>

<div id=myDiv> some div </div>
<textarea id=myTextArea> some text content </textarea>

<script>

fontSize.onchange=fontFamily.onchange=setTarget;
setTarget=[myDiv,myTextArea/*etc*/];

function setTarget(x){
	for(x in setTarget)
		setTarget[x].style[this.id] = this.value;
	}
</script>
</body>
</html>
0

Thanks..but in this i can't see CSS and events are not working as you've coded.where is the wrong?

Edited by divsok: n/a

0

you are not meant "to see CSS" and the wrong is your lack of copy-paste skill probably [!]
the code works perfectly in all browsers including the ones that are to be invented in the future.
and
what do you mean "events are not working as you've coded"? how "else" are they supposed to work? the other way around?

Edited by Troy III: n/a

0

sorry for my remissness friend.i checked in HTMLPad 2011 for previews.actually your code is working perfect on browsers..thank you very much.

0

sorry for my remissness friend.i checked in HTMLPad 2011 for previews.actually your code is working perfect on browsers..thank you very much.

So, what is your problem than?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.