<html>
<head> <title> stylesheet language transform color </ title>

</ head>
<script>
function changeColor ()
(
var title = document.getElementById ( "title"). value;
var select = document.getElementById ( "selector"). value;
if (select == "two")
(
document.getElementById ( "title"). style.color = "green";
)
else document.getElementById ( "title"). style.color = "red";
)

function changeStyle ()
(
var title = document.getElementById ( "title"). value;
var select = document.getElementById ( "selector2"). value;
if (select == "two")
(
document.getElementById ( "title"). style.fontFamily = "Times New Roman";
)
else
document.getElementById ( "title"). style.fontFamily = "italic";
)

</ script>
<body>
<form name="form1">
<input type="text" name="title" value="黑色头发">
<select name="selector" onchange="changeColor()">
<option value="one"> red </ option>
<option value="two"> Green </ option>
</ select>
<select name="selector2" onchange="changeStyle()">
<option value="one"> Song </ option>
<option value="two"> italics </ option>
</ select>
</ form>
</ body>
</ html>

<html>
<head> <title> stylesheet language transform color </ title>

</ head>
<script>
function changeColor ()
(
var title = document.getElementById ( "title"). value;
var select = document.getElementById ( "selector"). value;
if (select == "two")
(
document.getElementById ( "title"). style.color = "green";
)
else document.getElementById ( "title"). style.color = "red";
)

function changeStyle ()
(
var title = document.getElementById ( "title"). value;
var select = document.getElementById ( "selector2"). value;
if (select == "two")
(
document.getElementById ( "title"). style.fontFamily = "Times New Roman";
)
else
document.getElementById ( "title"). style.fontFamily = "italic";
)

</ script>
<body>
<form name="form1">
<input type="text" name="title" value="黑色头发">
<select name="selector" onchange="changeColor()">
<option value="one"> red </ option>
<option value="two"> Green </ option>
</ select>
<select name="selector2" onchange="changeStyle()">
<option value="one"> Song </ option>
<option value="two"> italics </ option>
</ select>
</ form>
</ body>
</ html>