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

js 弹出对话框,该怎么处理

2012-02-05 
js 弹出对话框html xmlnshttp://www.w3.org/1999/xhtml head runatservertitleUntitled Page

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"
去掉

热点排行