未被IE F12开发人员工具识别

时间:2013-09-13 13:35:20

标签: html css html5

我在IE上使用F12开发者工具运行我的网站,我检查控制台是否有错误。并且控制台提到了最后</p>的不匹配结束标记。虽然此

有一个起始标记<p id="uppersearch">,但如下所示:

Home.aspx,第447行第1期

<p id="currentdate"></p>
<p id="currenttime" ></p>
<p id="uppersearch">
    <div id="DeltaPlaceHolderSearchArea" class="ms-mpSearchBox ms-floatRight">
        <div id="searchInputBox">
            <div class="ms-webpart-chrome ms-webpart-chrome-fullWidth ">
                <div WebPartID="00000000-0000-0000-0000-000000000000" HasPers="true" id="WebPartWPQ1" width="100%" class="ms-WPBody noindex " OnlyForMePart="true" allowDelete="false" style="" >
                    <div componentid="ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr" id="ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr">
                        <div id="SearchBox" name="Control">
                            <div class="ms-srch-sb ms-srch-sb-border" id="ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_sboxdiv">
                                <input type="text" value="Search this site" maxlength="2048" accessKey="S" title="Search this site" id="ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_sbox" autocomplete="off" autocorrect="off" onkeypress="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {if (Srch.U.isEnterKey(String.fromCharCode(event.keyCode))) {$find('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr').search($get('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_sbox').value);return Srch.U.cancelEvent(event);}})" onkeydown="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {var ctl = $find('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr');ctl.activateDefaultQuerySuggestionBehavior();})" onfocus="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {var ctl = $find('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr');ctl.hidePrompt();ctl.setBorder(true);})" onblur="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {var ctl = $find('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr'); if (ctl){ ctl.showPrompt(); ctl.setBorder(false);}})" class="ms-textSmall ms-srch-sb-prompt ms-helperText"/>
                                <a title="Search" class="ms-srch-sb-searchLink" id="ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_SearchLink" onclick="EnsureScriptFunc('Search.ClientControls.js', 'Srch.U', function() {$find('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr').search($get('ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_sbox').value);})" href="javascript: {}" >
                                    <img src="/_layouts/15/images/searchresultui.png?rev=23" class="ms-srch-sb-searchImg" id="searchImg" alt="Search" />
                                </a>
                                <div class="ms-qSuggest-container ms-shadow" id="AutoCompContainer">
                                    <div id="ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_csr_AutoCompList"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <noscript>
                        <div id="ctl00_PlaceHolderSearchArea_SmallSearchInputBox1_noscript">It looks like your browser does not have JavaScript enabled. Please turn on JavaScript and try again.</div>
                    </noscript>
                    <div id="ctl00_PlaceHolderSearchArea_SmallSearchInputBox1"></div>
                    <div class="ms-clear"></div>
                </div>
            </div>
        </div>
    </div>
</p>

2 个答案:

答案 0 :(得分:8)

  • <p>的结束标记是可选的
  • <p>不能包含<div>

当您打开<div>时,您会隐式地结束<p>。然后,当您尝试使用</p>关闭它时,它已经关闭。

答案 1 :(得分:1)

根据X HTML,打开的html的每个标签都必须关闭,首先安装火灾bug并检查你的标签是否有内容或它的流量?其次,为什么不使用div而不是p?