首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

以上代码在小弟我的浏览器下老报错

2012-08-28 
以下代码在我的浏览器上老报错HTML codehtmlheadscript typetext/javacriptfunction upperCase_(

以下代码在我的浏览器上老报错

HTML code
<html>        <head>        <script type="text/javacript">            function upperCase_()            {                var x = document.getElementById("fname").value;                document.getElementById("fname").value = x.toUpperCase();            }            function test()            {                alert("come on");            }        </script>    </head>    <body>        输入姓名:        <input type="text" id="fname" onblur="upperCase_()">    </body></html>


不知道是我的设置问题还是什么。,现在连进CSDN的主页它都报错了,这个代码是对的还是,有问题的啊,有问题,问题在哪?
我是原封不动地朝的啊

[解决办法]
type="text/javacript"落下一个s
HTML code
<html>        <head>        <script type="text/javascript">            function upperCase_()            {                var x = document.getElementById("fname").value;                document.getElementById("fname").value = x.toUpperCase();            }            function test()            {                alert("come on");            }        </script>    </head>    <body>        输入姓名:        <input type="text" id="fname" onblur="upperCase_()">    </body></html>
[解决办法]
加上“s”<script type="text/javascript">,就ok

[解决办法]
我是原封不动地朝的啊??????????

热点排行