tryit_view.asp@filename=trydhtml_form_color_select2
来自「W3Schools tutorial..web designing」· ASP@FILENAME=TRYDHTML_FORM_COLOR_SELECT2 代码 · 共 33 行
ASP@FILENAME=TRYDHTML_FORM_COLOR_SELECT2
33 行
<html>
<head>
<script type="text/javascript">
function changeColor(color)
{
myForm.elements[0].style.color=color;
}
</script>
</head>
<body>
<p>This example demonstrates how to change the text color of an option list.</p>
<p>Mouse over the three colored table cells, and the option list will change color:</p>
<table width="100%"><tr>
<td bgcolor="red" onmouseover="changeColor('red')"> </td>
<td bgcolor="blue" onmouseover="changeColor('blue')"> </td>
<td bgcolor="green" onmouseover="changeColor('green')"> </td>
</tr></table>
<form name="myForm">
<select>
<option>Mouse over the colored table cells
<option>Mouse over the colored table cells
<option>Mouse over the colored table cells
<option>Mouse over the colored table cells
</select>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?