Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 3rd, 2005, 07:09 AM
Authorized User
Join Date: Jul 2005
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default from javascript to css

I need to change this javascript into a css file and make it function like it is now but I don't want to have javascript enabled on the web browser. Can someone help me?

<script type="text/javascript">
function SelectSize()
var dropDown=document.getElementById("size");
var SelectedSize = dropDown.options[dropDown.selectedIndex].value;
document.body.style.fontSize=SelectedSize + "px";
<form name="frmcontrol">
<select id=size onChange="SelectSize()" >
<option value="20">Default
<option value="12">Very Small
<option value="72">Very Large
<input type="button" value="Change Size of Text" name="myButton" onClick="SelectSize()" />

<script language="javascript">

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

<BODY bgColor=#006633>

<script language="javascript">

function change()
<form name="text">
<select name="color">
<option value="black">Default
<option value="black">Black
<input type="button" value="Change Text color" name="myButton3" onClick="change()" />

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to access CSS using JavaScript? Gary Frank Javascript How-To 2 February 28th, 2008 01:32 PM
replace css with javascript Maxxim CSS Cascading Style Sheets 11 October 7th, 2007 02:29 PM
JavaScript, CSS, DOM - xBrowser Problem erobb Javascript 1 September 10th, 2006 06:44 AM
external CSS in JavaScript code webdesign Javascript 1 September 1st, 2006 04:35 PM
from javascript to css jstewie CSS Cascading Style Sheets 3 August 8th, 2005 02:44 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.