<!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>
Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
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?
Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
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?
Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80