日期:2014-05-18  浏览次数:20800 次

js 弹出对话框
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
  <title>Untitled Page</title>
  <script language="javascript" type="text/jscript">
  function scrollToViewMe()
  {
  alert("a"); 
  }
  </script>
</head>
<body>
  <form id="form1" runat="server">
  <div> 
  <input id="Button1" type="button" value="button" onclick="scrollToViewMe();" />
  </div>
  </form>
</body>
</html>

上面这段代码在IE7可以运行,但在firefox不能运行,这么简单的,我要疯了。firefox版本Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.15) Gecko/20080623 Firefox/2.0.0.15


直接用<input id="Button1" type="button" value="button" onclick="alert('a');" />
可以运行成功。



------解决方案--------------------
type="text/jscript"
去掉