...

View Full Version : How do you make the text increase and decrease with the rest of the page?



jstewie
07-12-2005, 06:01 PM
<script language="JavaScript">
function SelectSize()
{
var dropDown=document.getElementById("size");
var SelectedSize = dropDown.options[dropDown.selectedIndex].text;
}
{ document.getElementById().style.fontSize=SelectedSize; }
}
</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="green">Green
</select>
<input type="button" value="Change Background color" name="myButton" onClick="colorChange()" />
</form>

nikkiH
07-12-2005, 07:32 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
</head>

<body>
<script type="text/javascript">
function SelectSize()
{
var dropDown=document.getElementById("size");
var SelectedSize = dropDown.options[dropDown.selectedIndex].text;
document.body.style.fontSize=SelectedSize;
}
</script>

<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>

</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum