改变文本框字体颜色的js脚本
内容摘要
<script language="javascript">
function colors(color){
document.form1.id.style.color=color;
}
</script>
<body>
<form action=" " name="form1" method="p
function colors(color){
document.form1.id.style.color=color;
}
</script>
<body>
<form action=" " name="form1" method="p
文章正文
<script language="javascript">
function colors(color){
document.form1.id.style.color=color;
}
</script>
<body>
<form action=" " name="form1" method="post">
<input type="text" name="id" value="phpStudy-www.phpstudy.net" />
<select name="coid" onchange="colors(this.value)">
<option value="red">红色</option>
<option value="green">绿色</option>
</select>
</form>
function colors(color){
document.form1.id.style.color=color;
}
</script>
<body>
<form action=" " name="form1" method="post">
<input type="text" name="id" value="phpStudy-www.phpstudy.net" />
<select name="coid" onchange="colors(this.value)">
<option value="red">红色</option>
<option value="green">绿色</option>
</select>
</form>
代码注释
[!--zhushi--]