缺少关闭脚本标记'>'的Jquery问题

时间:2014-09-23 19:31:33

标签: javascript jquery html

<html>
<head>
**<script**
<script language="jscript">
<!--
    function OnLoad()
    {

        try
        {
           Some code here
        }
        catch (e)
        {
            Some code here
        }
    }

    function OnUnload()
    {
        try
        {
            Some code here
        }
        catch(e)
        {
            Some code here
        }
    }
-->
</script>
</head>
<body style="background: url(..\ABC.gif) #ffffff fixed no-repeat;" onload="OnLoad()" onunload="OnUnload()">
</body>
</html>

虽然没有必要但我有两个脚本标签,第一个没有正确关闭。 有趣的是,我的应用程序没有给出与此相关的任何错误。但我正面临一些jquery问题,例如&#34; XYZ&#34;是null还是不是对象。这些问题是否会因为这种错误的语法而出现?它会导致任何其他问题吗?任何建议都将不胜感激。

1 个答案:

答案 0 :(得分:0)

标签被视为:

<script <script language="jscript">

第二个<script被解释为script标记的属性。它是一个无法识别的属性,因此被忽略了。它与以下内容没什么不同:

<script blah language="jscript">
相关问题