在FirFox下正常而在IE下不显示的问题

    有时候,这样的问题会耽误你很多时间:

    下面这个例子 —— 页面上一个按钮,点击后,js输出“1111”提示框。在FixFox下没有任何问题,但在IE下,连按钮都显示不出来:

< html >
< head >
    
< script  type ="text/javascript"  src ="a.js"   />
</ head >
< body >
    
< input type = " button "  onclick = " OutPut() "  value = " alert "   >
</ body >
</ html >

    a.js里面有OutPut()的定义:

function  OutPut()
{
        alert(
' 1111 ' );
}

    问题出在这里<script />,在IE下应该拆开<script><script/>,即修改引用a.js的地方就好了。

你可能感兴趣的:(html,function,IE,button,output)