javascript onchange 缺少对象

来源:百度知道 编辑:UC知道 时间:2024/06/07 02:36:46
很简单的一段,代码如下,高手帮忙看看

<html>
<head>
<script language='JavaScirpt'>
<!--
function test()
{
alert("function");
return;
}
//-->
</script>
</head>
<body>
<form>
<select name="currentcategory" id="currentcategory" onChange='test()'>
<option value='9' id='9' selected>test9</option>
<option value='1' id='1' >test1</option>
<option value='2' id='2' >test2</option>
</select>
</form>
</body>
</html>

<html>
<head>
<script>
<!--
function test()
{
alert("function");
return;
}
//-->
</script>
</head>
<body>
<form>
<select name="currentcategory" id="currentcategory" onChange='test()'>
<option value='9' id='9' selected>test9</option>
<option value='1' id='1' >test1</option>
<option value='2' id='2' >test2</option>
</select>
</form>
</body>
</html>
修改好了
language='JavaScirpt' 应该是大小写有问题吧!
IE 无法识别语言
<!---->这里面的 没有显示