p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript How-To (http://p2p.wrox.com/forumdisplay.php?f=87)
-   -   text increase/decrease ... (http://p2p.wrox.com/showthread.php?t=31422)

jstewie July 12th, 2005 12:13 PM

text increase/decrease ...
 
How do I make the text increase and decrease with the rest of the page?

<script language="JavaScript">
function SelectSize()
{
var dropDown=document.getElementById("size");
var SelectedSize = dropDown.options[dropDown.selectedIndex].text;
}
{ document.getElementById().style.fontSize=SelectedS ize; }
}
</script>
</head>

<body>
<form name="frmcontrol">
Change Size of Text<p>
<select id=size onChange="SelectSize()" >
 <option value="8">8px</option>
<option value="9">9px</option>
<option value="10">10px</option>
<option value="12">12px</option>
<option value="15">15px</option>
<option value="20">20px</option>
<option value="25">25px</option>
<option value="72">72px</option>
</select>
</form>

<script language="javascript">

function colorChange()
{
document.bgColor=document.list.colors.options[document.list.colors.selectedIndex].value;
}
</script>

Change Background Color:
<form name="list">
<select name="colors">
<option value="006633">Default
<option value="black">Black
<option value="white">White
</select>
<input type="button" value="Change Background color" name="myButton" onClick="colorChange()" />
</form>




All times are GMT -4. The time now is 03:16 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.