pushState()和popState():操纵浏览器的历史 [英] pushState() and popState(): manipulating browsers' history

查看:251
本文介绍了pushState()和popState():操纵浏览器的历史的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个小项目,我想在其中创建一个Ajax风格的网站。内容使用jQuery的 load()加载。正如你们中的一些人所知,这样做的缺点是URL不会相应地改变显示的内容。要完成这项工作,您可以使用 pushState()。由于这不支持跨浏览器,因此我使用插件 history.js



这是可行的相当好,但问题是我的后退和前进按钮不能正常工作,我不知道我做错了什么。 URL正在正确更改,内容也是如此,但标题根本没有变化。对于标题,我的意思是显示为浏览器窗口的窗口(或标签)的标题。即加载页面的< title> 或引用该页面的链接的标题属性(它们是相同的)。我认为这与我只呼叫我需要标题的一部分页面(即向载入中添加 #content )的事实有关())。我仍然想要那个页面的标题。这是我迄今为止所做的一个测试案例。 (自2013年12月28日起不再提供)。jQuery文件:

  $(document).ready(function(){ 
var firstLink = $(ul> li:first-child> a);
var menuLink = $(ul> li> a);
var firstLoadedHtml = firstLink.attr(href)+#content;

$(#sectionContainer)。hide()。load(firstLoadedHtml).fadeIn(fast);
firstLink.addClass(active);

menuLink.click(function(e){
history.pushState(null,null,this.href);

e.preventDefault();
e.stopImmediatePropagation();

var CurLink = $(this);
var newLoadedHtml = CurLink.attr(href)+ #content;
var oldSection = $(。contentPage);

$(#sectionContainer)。hide()。load(newLoadedHtml).fadeIn(fast );
menuLink.removeClass(active);
CurLink.addClass(active);
});

$(window).bind( 'popstate',函数( ){
var returnLocation = history.location || document.location;

$('#sectionContainer')。load(returnLocation +#content);
});
});

我还注意到,当回到基本页面(即/ sectionLoaderTest /)时,它变为空白一段时间后,仅在一段时间后加载第一页的内容。有没有办法优化它?



此外,我使用jQuery将一个活动类添加到已被单击的链接。我怎样才能确保这个变化相应的历史?因此,当用户导航返回时,正确的链接会突出显示。



因此,这三个问题是:

$ ol b $ b

  • 在前进和后退时获取标题

  • 优化主页的加载时间
  • 修复active class前进和后退

  • 所有帮助都欢迎您!
    $ b 1 :我想建立在history.js和我自己的脚本上,并继续支持< HTML5 浏览器。我更喜欢这个因为1.我知道这必须起作用,有些事情会出错。 2.如果我能看到自己的解决方案并在我已经写过的脚本中实现它,而不是找出一个全新的脚本,那将节省时间。


    $ b

    注2 :赏金只会给予他或她谁可以回答我所有的问题(3)!

    > 回答1 - 在前进和后退时获得标题



    据我了解,您希望将文档标题html从链接加载在一个div中。当您通过jQuery .load 在div中加载文件时,您只需在其中输入ajax请求后插入完整的响应文本。因此,所有不应该在div中的东西,如 title meta 标记。然而,当前文档的标题( http://bramvanroy.be/sectionLoaderTest/index.html )在 title 它位于头部标记内,而不在

    </c $ c>标记内,这就是文档标题</p> <br/> <br/> <p> <em>那么我该如何解决它?</p> <b> <br/> <br/> <p>好问题,因为<code> div </code>元素中的<code>标题</code>元素是无效的,所以大多数浏览器都会删除它,所以你不能使用这个:<b> <br/> <br/> </p><pre> <code> document.title = $(#sectionContainer title)。text(); <br/> </code> </pre><p>因为<code> title </code>元素可能不存在。 </p> <br/> <br/> <p>所以我们需要的是来自jQuery <code> .load </code>函数的直接响应。我可以通过向函数添加回调参数来获得它:<b> <br/> <br/> </p><pre> <code> $(#sectionContainer)<br/> .hide ()<br/> .load(newLoadedHtml,function(responseText){<br/> document.title = $(responseText).filter(title).text(); <br/>})<br/> .fadeIn( 快); <br/> </code> </pre><p>你可能不明白为什么我使用<code> .filter </code>而不是<code> .find </code>函数。这是因为jQuery是一种解析<code> html </code>,<code> head </code>和<code> body </$ c $ </p> <br/> <br/> <p> <strong>答案2 - 优化主页的加载时间</strong> </p> <br/> <br/> <p>文档从顶部到底部加载。</p> <br/> <br/> <p>所以首先,CSS,JavaScript等应该是加载然后是主文档。 <br/>因为jQuery总是在执行之前等待文档,所以将所有<code>脚本</code>元素放在主体结束之前并不是一个坏主意,所以你的HTML可以加载之前。</p> <br/> <br/> <p> BtW我刚刚遇到了这个问题,所有东西都被缓存了,文档加载非常快。 p> <br/> <br/> <p> <strong>答案3 - 在前进和后退时修复主动类</strong> <b> <br/> <br/> <p>说循环通过<code> a </code>元素的<code> href </code>属性并将其与<code>历史记录中的数据进行比较.getState()</code>。应该很简单。</p> <br/> <br/> <p> <strong>您在代码中犯了一些错误 - 您的固定代码:</strong> <b> <br/> <br/> <p>您将哈希<code> #content </code>附加到所有网址中。它没有任何意义,它会再次被jQuery删除:<a href =https:/ /github.com/jquery/jquery/blob/master/src/ajax.js#L617\">https://github.com/jquery/jquery/blob/master/src/ajax.js#L617 </a>(来自行:158,190,337,617 - rhash在行6)<br/> <br/> </p><pre> <code> $(document).ready(function (){<br/> var firstLink = $(ul> li:first-child> a); <br/> var menuLink = $(ul> li> a); <br/> var firstLoadedHtml = firstLink.attr(href); <br/> <br/> $(#sectionContainer)。hide()。load(firstLoadedHtml).fadeIn(fast); <br/> firstLink .addClass(active); <br/> <br/> menuLink.click(function(e){<br/> <br/> e.preventDefault(); <br/> e.stopImmediatePropagation(); <br/> <br/> var newLoadedHtml = $(this).attr(href); <br/> <br/> His tory.pushState(null,newLoadedHtml,newLoadedHtml); <br/> <br/> $(#sectionContainer)<br/> .hide()<br/> .load(newLoadedHtml,function(responseText){<br/> document.title = $(responseText)。 filter(title).text(); <br/>})<br/> .fadeIn(fast); <br/>}); <br/> <br/> History.Adapter.bind(window,statechange,function(){<br/> menuLink.removeClass(active); <br/> $(a [href =' + History.getState()。title +'])。addClass(active); <br/> $('#sectionContainer')。load(document.location.href,function(responseText){<br/> document.title = $(responseText).filter(title).text(); <br/>}); <br/>}); <br/>}); <br/> </code> </pre><p> <br/><p>I am working on a small project in which I want to create an Ajax-style website. Content is loaded with jQuery's <code>load()</code>. As some of you know, the down side of this is that the URL does not change accordingly to the content that is displayed. To make this work you can use <code>pushState()</code>. Because this is not cross-browser supported, I used the plug-in <code>history.js</code>.</p> <p>This is working quite nicely, but the problem is that my back and forward buttons are not working as they should and I have no idea what I am doing wrong. The URL is changing correctly and the content is as well, but the title is not changing at all. With title I mean what is shown as title of the window (or tab) of the browser window. I.e. the <code><title></code> of the page that is loaded OR the title attribute of the link that refers to that page (they are the same). I think it has to do with the fact that I call only a section of the page whose title I need (i.e. by adding <code>#content</code> to the <code>load()</code>). I still want the title of that page though. Here is a test case of what I have up to now. (Not available any more since 28 Dec. 2013.) jQuery file:</p><pre><code>$(document).ready(function () { var firstLink = $("ul > li:first-child > a"); var menuLink = $("ul > li > a"); var firstLoadedHtml = firstLink.attr("href") + " #content"; $("#sectionContainer").hide().load(firstLoadedHtml).fadeIn("fast"); firstLink.addClass("active"); menuLink.click(function(e) { history.pushState(null, null, this.href); e.preventDefault(); e.stopImmediatePropagation(); var CurLink = $(this); var newLoadedHtml = CurLink.attr("href") + " #content"; var oldSection = $(".contentPage"); $("#sectionContainer").hide().load(newLoadedHtml).fadeIn("fast"); menuLink.removeClass("active"); CurLink.addClass("active"); }); $(window).bind('popstate', function() { var returnLocation = history.location || document.location; $('#sectionContainer').load(returnLocation + "#content"); }); }); </code></pre><p>I also noted that when going back to the basic page (i.e. /sectionLoaderTest/) it goes blank for a while and only after a while the content of the first page is loaded. Is there a way to optimize this?</p> <p>Additionally, I am using jQuery to add an active-class to the link that has been clicked. How can I make sure that this changes accordingly to the history? So that the correct link is highlighted when a user navigates back?</p> <p>So the three questions are:</p><ol> <li>Get the title working when going forward and backward</li> <li>Optimize the load time of the mainpage</li> <li>Fix the active-class when going forward and backward</li> </ol><p>All help welcome!</p> <p><strong>NOTE 1</strong>: I would like to build on history.js and my own script and as such keep support for <code>< HTML5</code> browsers. I would prefer this because 1. I know this has to work, there is just something that's going wrong. 2. It would save time if I could see one's solution and implement it in the script I already wrote rather than figuring out a whole new script.</p> <p><strong>NOTE 2</strong>: The bounty will only be given to he or she who can answer all of my questions (3)!</p><div class="h2_lin"> 解决方案 </div><p><strong>Answer 1 - Get the title working when going forward and backward</strong></p> <p>As far as I understood you want to change the document title html from the link is loaded in a div. When you're loading a file in a div via jQuery <code>.load</code> you're just inserting the complete response text after an ajax request in it. So with all the stuff which shouldn't be in a div like the <code>title</code> or <code>meta</code> tag. However the title of the current document (<code>http://bramvanroy.be/sectionLoaderTest/index.html</code>) is defined in the <code>title</code> which is inside the <code>head</code> tag and not in the <code>title</code> tag inside a div so that's why the document title doesn't change.</p> <p><em>So how can I fix it?</em></p> <p>Good question, because the <code>title</code> element inside a <code>div</code> element is invalid, most browsers will remove it so you can't just use this:</p><pre><code>document.title = $("#sectionContainer title").text(); </code></pre><p>because the <code>title</code> element may not exist.</p> <p>So what we need is the direct response from the jQuery <code>.load</code> function. I can get it by adding the callback argument to the function:</p><pre><code>$("#sectionContainer") .hide() .load(newLoadedHtml, function(responseText) { document.title = $(responseText).filter("title").text(); }) .fadeIn("fast"); </code></pre><p>What you may not understand is why I use the <code>.filter</code> and not the <code>.find</code> function. This is because jQuery is kind of parsing <code>html</code>, <code>head</code> and <code>body</code> tags out of the html but not removing there child elements.</p> <p><strong>Answer 2 - Optimize the load time of the mainpage</strong></p> <p>A document is getting loaded from to top to the bottom.</p> <p>So first of all the css, JavaScript etc. should be loaded and then the the main document. Because jQuery is always waiting for the document before it's executing it wouldn't be a very bad idea to put all your <code>script</code> elements right before the end of the body, so that your HTML can be loaded before.</p> <p>BtW I just had this problem at the first time after that everything was cached and the document was loading very fast.</p> <p><strong>Answer 3 - Fix the active-class when going forward and backward</strong></p> <p>I would say loop trough the <code>href</code> attributes of the <code>a</code> elements and compare it with the data from <code>History.getState()</code>. Should be easy.</p> <p><strong>You did some mistakes in your code - Your fixed code:</strong></p> <p>You appended the hash <code>#content</code> to all URLs.. it doesn't make sense and it will be removed by jQuery again: <a href="https://github.com/jquery/jquery/blob/master/src/ajax.js#L617">https://github.com/jquery/jquery/blob/master/src/ajax.js#L617</a> (Comes from lines: 158, 190, 337, 617 - rhash is on line 6)</p><pre><code>$(document).ready(function () { var firstLink = $("ul > li:first-child > a"); var menuLink = $("ul > li > a"); var firstLoadedHtml = firstLink.attr("href"); $("#sectionContainer").hide().load(firstLoadedHtml).fadeIn("fast"); firstLink.addClass("active"); menuLink.click(function(e) { e.preventDefault(); e.stopImmediatePropagation(); var newLoadedHtml = $(this).attr("href"); History.pushState(null, newLoadedHtml, newLoadedHtml); $("#sectionContainer") .hide() .load(newLoadedHtml, function(responseText) { document.title = $(responseText).filter("title").text(); }) .fadeIn("fast"); }); History.Adapter.bind(window, "statechange", function() { menuLink.removeClass("active"); $("a[href='" + History.getState().title + "']").addClass("active"); $('#sectionContainer').load(document.location.href, function(responseText) { document.title = $(responseText).filter("title").text(); }); }); }); </code></pre><p> <p>这篇关于pushState()和popState():操纵浏览器的历史的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!</p> </div> <div class="arc-body-main-more"> <span onclick="unlockarc('881257');">查看全文</span> </div> </div> <div> </div> <div class="wwads-cn wwads-horizontal" data-id="166" style="max-width:100%;border: 4px solid #666;"></div> </div> </article> <div id="arc-ad-2" class="mb-1"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5038752844014834" crossorigin="anonymous"></script> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5038752844014834" data-ad-slot="3921941283"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class="widget bgwhite radius-1 mb-1 shadow widget-rel"> <h5>相关文章</h5> <ul> <li> <a target="_blank" title="跨浏览器的jQuery AJAX历史window.history.pushState和回退" href="/48264.html"> 跨浏览器的jQuery AJAX历史window.history.pushState和回退; </a> </li> <li> <a target="_blank" title="如何使用pushstate HTML5操作浏览器历史记录" href="/1098004.html"> 如何使用pushstate HTML5操作浏览器历史记录; </a> </li> <li> <a target="_blank" title="操纵浏览器的导航按钮" href="/1336987.html"> 操纵浏览器的导航按钮; </a> </li> <li> <a target="_blank" title="浏览器历史管理" href="/841726.html"> 浏览器历史管理; </a> </li> <li> <a target="_blank" title="如何“浏览器返回"使用pushState时?" href="/2285361.html"> 如何“浏览器返回"使用pushState时?; </a> </li> <li> <a target="_blank" title="window.history.pushState刷新浏览器" href="/342026.html"> window.history.pushState刷新浏览器; </a> </li> <li> <a target="_blank" title="window.history.pushState 刷新浏览器" href="/2716410.html"> window.history.pushState 刷新浏览器; </a> </li> <li> <a target="_blank" title="HTML 5 - 阿贾克斯popstate和pushstate" href="/57374.html"> HTML 5 - 阿贾克斯popstate和pushstate; </a> </li> <li> <a target="_blank" title="HTML5 / jQuery:pushState和popState - 深层链接?" href="/881815.html"> HTML5 / jQuery:pushState和popState - 深层链接?; </a> </li> <li> <a target="_blank" title="检测浏览器历史操作" href="/2510725.html"> 检测浏览器历史操作; </a> </li> <li> <a target="_blank" title="javascript浏览器历史列表" href="/1023633.html"> javascript浏览器历史列表; </a> </li> <li> <a target="_blank" title="清除浏览器历史记" href="/1010640.html"> 清除浏览器历史记; </a> </li> <li> <a target="_blank" title="history.pushState不会触发'popstate'事件" href="/881916.html"> history.pushState不会触发'popstate'事件; </a> </li> <li> <a target="_blank" title="浏览器缓存和HTML / JSON路由的历史" href="/765467.html"> 浏览器缓存和HTML / JSON路由的历史; </a> </li> <li> <a target="_blank" title="AngularJS添加到浏览器的历史没有页面重载,无HTML5 pushState的" href="/199429.html"> AngularJS添加到浏览器的历史没有页面重载,无HTML5 pushState的; </a> </li> <li> <a target="_blank" title="history.pushstate使浏览器后退和前进按钮失败" href="/1010249.html"> history.pushstate使浏览器后退和前进按钮失败; </a> </li> <li> <a target="_blank" title="使用Splinter操纵浏览器(窗口)的大小" href="/1839252.html"> 使用Splinter操纵浏览器(窗口)的大小; </a> </li> <li> <a target="_blank" title="浏览器历史与ExtJS MVC" href="/746898.html"> 浏览器历史与ExtJS MVC; </a> </li> <li> <a target="_blank" title="编程清晰浏览器缓存/历史" href="/86235.html"> 编程清晰浏览器缓存/历史; </a> </li> <li> <a target="_blank" title="浏览不同浏览器的历史记录" href="/1297464.html"> 浏览不同浏览器的历史记录; </a> </li> <li> <a target="_blank" title="阻止浏览器在HTML5 History popstate上滚动" href="/881488.html"> 阻止浏览器在HTML5 History popstate上滚动; </a> </li> <li> <a target="_blank" title="jQuery页面过渡和浏览器历史记录" href="/1777222.html"> jQuery页面过渡和浏览器历史记录; </a> </li> <li> <a target="_blank" title="从浏览器中删除历史点" href="/270670.html"> 从浏览器中删除历史点; </a> </li> <li> <a target="_blank" title="以编程方式访问浏览器历史" href="/761861.html"> 以编程方式访问浏览器历史; </a> </li> <li> <a target="_blank" title="关闭浏览器历史记录" href="/1447259.html"> 关闭浏览器历史记录; </a> </li> </ul> </div> <div class="mb-1"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5038752844014834" crossorigin="anonymous"></script> <ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5038752844014834" data-ad-slot="3921941283"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="side"> <div class="widget widget-side bgwhite mb-1 shadow"> <h5>前端开发最新文章</h5> <ul> <li> <a target="_blank" title="为什么Chrome(在Electron内部)突然重定向到chrome-error:// chromewebdata?" href="/1996151.html"> 为什么Chrome(在Electron内部)突然重定向到chrome-error:// chromewebdata?; </a> </li> <li> <a target="_blank" title="错误102(net :: ERR_CONNECTION_REFUSED):服务器拒绝连接" href="/749568.html"> 错误102(net :: ERR_CONNECTION_REFUSED):服务器拒绝连接; </a> </li> <li> <a target="_blank" title="如何解决'重定向已被CORS策略阻止:没有'Access-Control-Allow-Origin'标题'?" href="/1009885.html"> 如何解决'重定向已被CORS策略阻止:没有'Access-Control-Allow-Origin'标题'?; </a> </li> <li> <a target="_blank" title="如何处理“Uncaught(in promise)DOMException:play()失败,因为用户没有首先与文档交互。”在桌面上使用Chrome 66?" href="/884909.html"> 如何处理“Uncaught(in promise)DOMException:play()失败,因为用户没有首先与文档交互。”在桌面上使用Chrome 66?; </a> </li> <li> <a target="_blank" title="警告:添加非被动事件侦听器到滚动阻塞'touchstart'事件" href="/818517.html"> 警告:添加非被动事件侦听器到滚动阻塞'touchstart'事件; </a> </li> <li> <a target="_blank" title="如何在浏览器中播放.TS文件(视频/ MP2T媒体类型)?" href="/343346.html"> 如何在浏览器中播放.TS文件(视频/ MP2T媒体类型)?; </a> </li> <li> <a target="_blank" title="此请求已被阻止;内容必须通过HTTPS提供" href="/886417.html"> 此请求已被阻止;内容必须通过HTTPS提供; </a> </li> <li> <a target="_blank" title="资源解释为样式表,但转换为MIME类型text / html(似乎与web服务器无关)" href="/562873.html"> 资源解释为样式表,但转换为MIME类型text / html(似乎与web服务器无关); </a> </li> <li> <a target="_blank" title="通过HTTPS加载页面但请求不安全的XMLHttpRequest端点" href="/885901.html"> 通过HTTPS加载页面但请求不安全的XMLHttpRequest端点; </a> </li> <li> <a target="_blank" title="拒绝从执行脚本'*',因为它的MIME类型(“应用/ JSON')不是可执行文件,并严格MIME类型检查被启用。" href="/47347.html"> 拒绝从执行脚本'*',因为它的MIME类型(“应用/ JSON')不是可执行文件,并严格MIME类型检查被启用。; </a> </li> </ul> </div> <div class="widget widget-side bgwhite mb-1 shadow"> <h5> 热门教程 </h5> <ul> <li> <a target="_blank" title="Java教程" href="/OnLineTutorial/java/index.html"> Java教程 </a> </li> <li> <a target="_blank" title="Apache ANT 教程" href="/OnLineTutorial/ant/index.html"> Apache ANT 教程 </a> </li> <li> <a target="_blank" title="Kali Linux教程" href="/OnLineTutorial/kali_linux/index.html"> Kali Linux教程 </a> </li> <li> <a target="_blank" title="JavaScript教程" href="/OnLineTutorial/javascript/index.html"> JavaScript教程 </a> </li> <li> <a target="_blank" title="JavaFx教程" href="/OnLineTutorial/javafx/index.html"> JavaFx教程 </a> </li> <li> <a target="_blank" title="MFC 教程" href="/OnLineTutorial/mfc/index.html"> MFC 教程 </a> </li> <li> <a target="_blank" title="Apache HTTP客户端教程" href="/OnLineTutorial/apache_httpclient/index.html"> Apache HTTP客户端教程 </a> </li> <li> <a target="_blank" title="Microsoft Visio 教程" href="/OnLineTutorial/microsoft_visio/index.html"> Microsoft Visio 教程 </a> </li> </ul> </div> <div class="widget widget-side bgwhite mb-1 shadow"> <h5> 热门工具 </h5> <ul> <li> <a target="_blank" title="Java 在线工具" href="/Onlinetools/details/4"> Java 在线工具 </a> </li> <li> <a target="_blank" title="C(GCC) 在线工具" href="/Onlinetools/details/6"> C(GCC) 在线工具 </a> </li> <li> <a target="_blank" title="PHP 在线工具" href="/Onlinetools/details/8"> PHP 在线工具 </a> </li> <li> <a target="_blank" title="C# 在线工具" href="/Onlinetools/details/1"> C# 在线工具 </a> </li> <li> <a target="_blank" title="Python 在线工具" href="/Onlinetools/details/5"> Python 在线工具 </a> </li> <li> <a target="_blank" title="MySQL 在线工具" href="/Onlinetools/Dbdetails/33"> MySQL 在线工具 </a> </li> <li> <a target="_blank" title="VB.NET 在线工具" href="/Onlinetools/details/2"> VB.NET 在线工具 </a> </li> <li> <a target="_blank" title="Lua 在线工具" href="/Onlinetools/details/14"> Lua 在线工具 </a> </li> <li> <a target="_blank" title="Oracle 在线工具" href="/Onlinetools/Dbdetails/35"> Oracle 在线工具 </a> </li> <li> <a target="_blank" title="C++(GCC) 在线工具" href="/Onlinetools/details/7"> C++(GCC) 在线工具 </a> </li> <li> <a target="_blank" title="Go 在线工具" href="/Onlinetools/details/20"> Go 在线工具 </a> </li> <li> <a target="_blank" title="Fortran 在线工具" href="/Onlinetools/details/45"> Fortran 在线工具 </a> </li> </ul> </div> </div> </div> <script type="text/javascript">var eskeys = 'pushstate,和,popstate,操纵,浏览器,的,历史'; var cat = 'cc';';//qianduan</script> </div> <div id="pop" onclick="pophide();"> <div id="pop_body" onclick="event.stopPropagation();"> <h6 class="flex flex101"> 登录 <span onclick="pophide();">关闭</span> </h6> <div class="pd-1"> <div class="wxtip center"> <span>扫码关注<em>1秒</em>登录</span> </div> <div class="center"> <img id="qr" src="https://huajiakeji.com/Content/Images/qrydx.jpg" alt="" style="width:150px;height:150px;" /> </div> <div style="margin-top:10px;display:flex;justify-content: center;"> <input type="text" placeholder="输入验证码" id="txtcode" autocomplete="off" /> <input id="btngo" type="button" onclick="chk()" value="GO" /> </div> <div class="center" style="margin: 4px; font-size: .8rem; color: #f60;"> 发送“验证码”获取 <em style="padding: 0 .5rem;">|</em> <span style="color: #01a05c;">15天全站免登陆</span> </div> <div id="chkinfo" class="tip"></div> </div> </div> </div> <script type="text/javascript" src="https://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="https://cdn.bootcss.com/jquery-cookie/1.4.1/jquery.cookie.min.js"></script> <script type="text/javascript" src="https://img01.yuandaxia.cn/Scripts/highlight.min.js"></script> <script type="text/javascript" src="https://img01.yuandaxia.cn/Scripts/base.js?v=0.22"></script> <script type="text/javascript" src="https://img01.yuandaxia.cn/Scripts/tui.js?v=0.11"></script> <footer class="footer"> <div class="container"> <div class="flink mb-1"> 友情链接: <a href="https://www.it1352.com/" target="_blank">IT屋</a> <a href="https://huajiakeji.com/" target="_blank">Chrome插件</a> <a href="https://www.cnplugins.com/" target="_blank">谷歌浏览器插件</a> </div> <section class="copyright-section"> <a href="https://www.it1352.com" title="IT屋-程序员软件开发技术分享社区">IT屋</a> ©2016-2022 <a href="http://www.beian.miit.gov.cn/" target="_blank">琼ICP备2021000895号-1</a> <a href="/sitemap.html" target="_blank" title="站点地图">站点地图</a> <a href="/Home/Tags" target="_blank" title="站点标签">站点标签</a> <a target="_blank" alt="sitemap" href="/sitemap.xml">SiteMap</a> <a href="/1155981.html" title="IT屋-免责申明"><免责申明></a> 本站内容来源互联网,如果侵犯您的权益请联系我们删除. </section> <!--统计代码--> <script type="text/javascript"> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?0c3a090f7b3c4ad458ac1296cb5cc779"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <script type="text/javascript"> (function () { var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </div> </footer> </body> </html>