{"id":67269,"date":"2015-08-21T14:42:59","date_gmt":"2015-08-21T06:42:59","guid":{"rendered":"http:\/\/www.xiaoyebailong.com\/?p=67269"},"modified":"2015-08-22T01:54:52","modified_gmt":"2015-08-21T17:54:52","slug":"js%e5%88%b7%e6%96%b0%e9%a1%b5%e9%9d%a2%e6%96%b9%e6%b3%95%e5%a4%a7%e5%85%a8","status":"publish","type":"post","link":"http:\/\/www.xiaoyebailong.com\/index.php\/2015\/08\/21\/67269.htm","title":{"rendered":"js\u5237\u65b0\u9875\u9762\u65b9\u6cd5\u5927\u5168"},"content":{"rendered":"<p>\u4e0d\u77e5\u9053\u4e3a\u5565\u5728html5\u4e2d\u548c\u8c37\u6b4c\u6d4f\u89c8\u5668\u4e2d\u6d4b\u8bd5\u53ea\u6709\u8fd9\u53e5\u597d\u7528<\/p>\n<p>&lt;a onclick=&#8221;window.location.href=window.location.href;&#8221;&gt;&lt;\/a&gt;<\/p>\n<p>\u4ee5\u4e0b\u6d4b\u8bd5\u6709\u7684\u597d\u7528\u6709\u7684\u6709\u4e00\u5b9a\u95ee\u9898\uff01\u8bf7\u81ea\u884c\u6d4b\u8bd5\uff01<\/p>\n<p><strong>1\uff0creload \u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u5f3a\u8feb\u6d4f\u89c8\u5668\u5237\u65b0\u5f53\u524d\u9875\u9762\u3002<br \/>\n<\/strong>\u8bed\u6cd5\uff1alocation.reload([bForceGet])<br \/>\n\u53c2\u6570\uff1a bForceGet\uff0c \u53ef\u9009\u53c2\u6570\uff0c \u9ed8\u8ba4\u4e3a false\uff0c\u4ece\u5ba2\u6237\u7aef\u7f13\u5b58\u91cc\u53d6\u5f53\u524d\u9875\u3002true, \u5219\u4ee5 GET \u65b9\u5f0f\uff0c\u4ece\u670d\u52a1\u7aef\u53d6\u6700\u65b0\u7684\u9875\u9762, \u76f8\u5f53\u4e8e\u5ba2\u6237\u7aef\u70b9\u51fb F5(&#8220;\u5237\u65b0&#8221;)<\/p>\n<p><strong>2\uff0creplace \u65b9\u6cd5\uff0c\u8be5\u65b9\u6cd5\u901a\u8fc7\u6307\u5b9aURL\u66ff\u6362\u5f53\u524d\u7f13\u5b58\u5728\u5386\u53f2\u91cc\uff08\u5ba2\u6237\u7aef\uff09\u7684\u9879\u76ee\uff0c\u56e0\u6b64\u5f53\u4f7f\u7528replace\u65b9\u6cd5\u4e4b\u540e\uff0c\u4f60\u4e0d\u80fd\u901a\u8fc7\u201c\u524d\u8fdb\u201d\u548c\u201c\u540e\u9000\u201d\u6765\u8bbf\u95ee\u5df2\u7ecf\u88ab\u66ff\u6362\u7684URL\u3002<br \/>\n<\/strong>\u8bed\u6cd5\uff1a location.replace(URL)<br \/>\n\u901a\u5e38\u4f7f\u7528\uff1a location.reload() \u6216\u8005\u662f history.go(0) \u6765\u505a\u3002<br \/>\n\u6b64\u65b9\u6cd5\u7c7b\u4f3c\u5ba2\u6237\u7aef\u70b9F5\u5237\u65b0\u9875\u9762\uff0c\u6240\u4ee5\u9875\u9762method=&#8221;post&#8221;\u65f6\uff0c\u4f1a\u51fa\u73b0&#8221;\u7f51\u9875\u8fc7\u671f&#8221;\u7684\u63d0\u793a\u3002<br \/>\n\u56e0\u4e3aSession\u7684\u5b89\u5168\u4fdd\u62a4\u673a\u5236\u3002<br \/>\n\u5f53\u8c03\u7528 location.reload() \u65b9\u6cd5\u65f6\uff0c aspx\u9875\u9762\u6b64\u65f6\u5728\u670d\u52a1\u7aef\u5185\u5b58\u91cc\u5df2\u7ecf\u5b58\u5728\uff0c \u56e0\u6b64\u5fc5\u5b9a\u662f IsPostback \u7684\u3002<br \/>\n\u5982\u679c\u6709\u8fd9\u79cd\u5e94\u7528\uff1a \u9700\u8981\u91cd\u65b0\u52a0\u8f7d\u8be5\u9875\u9762\uff0c\u4e5f\u5c31\u662f\u8bf4\u671f\u671b\u9875\u9762\u80fd\u591f\u5728\u670d\u52a1\u7aef\u91cd\u65b0\u88ab\u521b\u5efa\uff0c\u671f\u671b\u662f Not IsPostback \u7684\u3002<br \/>\n\u8fd9\u91cc\uff0clocation.replace() \u5c31\u53ef\u4ee5\u5b8c\u6210\u6b64\u4efb\u52a1\u3002\u88abreplace\u7684\u9875\u9762\u6bcf\u6b21\u90fd\u5728\u670d\u52a1\u7aef\u91cd\u65b0\u751f\u6210\u3002<br \/>\n\u4ee3\u7801\uff1a location.replace(location.href);<\/p>\n<p><strong>\u8fd4\u56de\u5e76\u5237\u65b0\u9875\u9762\uff1a<\/strong><\/p>\n<p>location.replace(document.referrer);<br \/>\ndocument.referrer \/\/\u524d\u4e00\u4e2a\u9875\u9762\u7684URL<\/p>\n<p>\u4e0d\u8981\u7528 history.go(-1)\uff0c\u6216 history.back();\u6765\u8fd4\u56de\u5e76\u5237\u65b0\u9875\u9762\uff0c\u8fd9\u4e24\u79cd\u65b9\u6cd5\u4e0d\u4f1a\u5237\u65b0\u9875\u9762\u3002<br \/>\n\u9644\uff1a<\/p>\n<p><strong>Javascript\u5237\u65b0\u9875\u9762\u7684\u51e0\u79cd\u65b9\u6cd5\uff1a<\/strong><\/p>\n<div class=\"codetitle\"><a id=\"copybut79198\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code79198\" class=\"codebody\">1\uff0chistory.go(0)<br \/>\n2\uff0clocation.reload()<br \/>\n3\uff0clocation=location<br \/>\n4\uff0clocation.assign(location)<br \/>\n5\uff0cdocument.execCommand(&#8216;Refresh&#8217;)<br \/>\n6\uff0cwindow.navigate(location)<br \/>\n7\uff0clocation.replace(location)<br \/>\n8\uff0cdocument.URL=location.href<\/div>\n<p><strong>\u81ea\u52a8\u5237\u65b0\u9875\u9762\u7684\u65b9\u6cd5:<br \/>\n1\uff0c\u9875\u9762\u81ea\u52a8\u5237\u65b0\uff1a\u628a\u5982\u4e0b\u4ee3\u7801\u52a0\u5165&lt;head&gt;\u533a\u57df\u4e2d<\/strong><\/p>\n<div class=\"codetitle\"><a id=\"copybut57172\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code57172\" class=\"codebody\">&lt;meta http-equiv=&#8221;refresh&#8221; content=&#8221;20&#8243;&gt;<\/div>\n<p>\u5176\u4e2d20\u6307\u6bcf\u969420\u79d2\u5237\u65b0\u4e00\u6b21\u9875\u9762.<br \/>\n<strong>2\uff0c\u9875\u9762\u81ea\u52a8\u8df3\u8f6c\uff1a\u628a\u5982\u4e0b\u4ee3\u7801\u52a0\u5165&lt;head&gt;\u533a\u57df\u4e2d<\/strong><\/p>\n<div class=\"codetitle\"><a id=\"copybut96693\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code96693\" class=\"codebody\">&lt;meta http-equiv=&#8221;refresh&#8221; content=&#8221;20;url=http:\/\/www.jb51.net&#8221;&gt;<\/div>\n<p>\u5176\u4e2d20\u6307\u969420\u79d2\u540e\u8df3\u8f6c\u5230http:\/\/www.jb51.net\u9875\u9762<br \/>\n<strong>3\uff0c\u9875\u9762\u81ea\u52a8\u5237\u65b0js\u7248<\/strong><\/p>\n<div class=\"codetitle\"><a id=\"copybut78130\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code78130\" class=\"codebody\">&lt;script language=&#8221;JavaScript&#8221;&gt;<br \/>\nfunction myrefresh()<br \/>\n{<br \/>\nwindow.location.reload();<br \/>\n}<br \/>\nsetTimeout(&#8216;myrefresh()&#8217;,1000); \/\/\u6307\u5b9a1\u79d2\u5237\u65b0\u4e00\u6b21<br \/>\n&lt;\/script&gt;<\/div>\n<p><strong>4\uff0cJS\u5237\u65b0\u6846\u67b6\u7684\u811a\u672c\u8bed\u53e5<\/strong><\/p>\n<div class=\"codetitle\"><a id=\"copybut60376\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code60376\" class=\"codebody\">\/\/\u5237\u65b0\u5305\u542b\u8be5\u6846\u67b6\u7684\u9875\u9762\u7528<br \/>\n&lt;script language=JavaScript&gt;<br \/>\nparent.location.reload();<br \/>\n&lt;\/script&gt;<br \/>\n\/\/\u5b50\u7a97\u53e3\u5237\u65b0\u7236\u7a97\u53e3<br \/>\n&lt;script language=JavaScript&gt;<br \/>\nself.opener.location.reload();<br \/>\n&lt;\/script&gt;<br \/>\n(\u3000\u6216\u3000&lt;a href=&#8221;javascript:opener.location.reload()&#8221;&gt;\u5237\u65b0&lt;\/a&gt;\u00a0\u00a0 )<br \/>\n\/\/\u5237\u65b0\u53e6\u4e00\u4e2a\u6846\u67b6\u7684\u9875\u9762\u7528<br \/>\n&lt;script language=JavaScript&gt;<br \/>\nparent.\u53e6\u4e00FrameID.location.reload();<br \/>\n&lt;\/script&gt;<\/div>\n<p>\u5982\u679c\u60f3\u5173\u95ed\u7a97\u53e3\u65f6\u5237\u65b0\u6216\u60f3\u5f00\u7a97\u65f6\u5237\u65b0\uff0c\u5728&lt;body&gt;\u4e2d\u8c03\u7528\u4ee5\u4e0b\u8bed\u53e5\u5373\u53ef\u3002<\/p>\n<div class=\"codetitle\"><a id=\"copybut87079\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code87079\" class=\"codebody\">&lt;body onload=&#8221;opener.location.reload()&#8221;&gt; \u5f00\u7a97\u65f6\u5237\u65b0<br \/>\n&lt;body onUnload=&#8221;opener.location.reload()&#8221;&gt; \u5173\u95ed\u65f6\u5237\u65b0<br \/>\n&lt;script language=&#8221;javascript&#8221;&gt;<br \/>\nwindow.opener.document.location.reload()<br \/>\n&lt;\/script&gt;<\/div>\n<p>\u4e00\u3001\u5148\u6765\u770b\u4e00\u4e2a\u7b80\u5355\u7684\u4f8b\u5b50\uff1a<\/p>\n<p>\u4e0b\u9762\u4ee5\u4e09\u4e2a\u9875\u9762\u5206\u522b\u547d\u540d\u4e3aframe.html\u3001top.html\u3001bottom.html\u4e3a\u4f8b\u6765\u5177\u4f53\u8bf4\u660e\u5982\u4f55\u505a\u3002<br \/>\nframe.html \u7531\u4e0a(top.html)\u4e0b(bottom.html)\u4e24\u4e2a\u9875\u9762\u7ec4\u6210\uff0c\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<div class=\"codetitle\"><a id=\"copybut6969\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code6969\" class=\"codebody\">&lt;!DOCTYPE HTML PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN&#8221;&gt;<br \/>\n&lt;HTML&gt;<br \/>\n&lt;HEAD&gt;<br \/>\n&lt;TITLE&gt; frame &lt;\/TITLE&gt;<br \/>\n&lt;\/HEAD&gt;<br \/>\n&lt;frameset rows=&#8221;50%,50%&#8221;&gt;<br \/>\n&lt;frame name=top src=&#8221;top.html&#8221;&gt;<br \/>\n&lt;frame name=bottom src=&#8221;bottom.html&#8221;&gt;<br \/>\n&lt;\/frameset&gt;<br \/>\n&lt;\/HTML&gt;<\/div>\n<p>\u73b0\u5728\u5047\u8bbetop.html (\u5373\u4e0a\u9762\u7684\u9875\u9762) \u6709\u4e03\u4e2abutton\u6765\u5b9e\u73b0\u5bf9bottom.html (\u5373\u4e0b\u9762\u7684\u9875\u9762) \u7684\u5237\u65b0\uff0c\u53ef\u4ee5\u7528\u4ee5\u4e0b\u4e03\u79cd\u8bed\u53e5\uff0c\u54ea\u4e2a\u597d\u7528\u81ea\u5df1\u770b\u7740\u529e\u4e86\u3002<br \/>\ntop.html \u9875\u9762\u7684\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<div class=\"codetitle\"><a id=\"copybut73857\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code73857\" class=\"codebody\">&lt;!DOCTYPE HTML PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN&#8221;&gt;<br \/>\n&lt;HTML&gt;<br \/>\n&lt;HEAD&gt;<br \/>\n&lt;TITLE&gt; top.html &lt;\/TITLE&gt;<br \/>\n&lt;\/HEAD&gt;<br \/>\n&lt;BODY&gt;<br \/>\n&lt;input type=button value=&#8221;\u5237\u65b01&#8243; onclick=&#8221;window.parent.frames[1].location.reload()&#8221;&gt;&lt;br&gt;<br \/>\n&lt;input type=button value=&#8221;\u5237\u65b02&#8243; onclick=&#8221;window.parent.frames.bottom.location.reload()&#8221;&gt;&lt;br&gt;<br \/>\n&lt;input type=button value=&#8221;\u5237\u65b03&#8243; onclick=&#8221;window.parent.frames[&#8216;bottom&#8217;].location.reload()&#8221;&gt;&lt;br&gt;<br \/>\n&lt;input type=button value=&#8221;\u5237\u65b04&#8243; onclick=&#8221;window.parent.frames.item(1).location.reload()&#8221;&gt;&lt;br&gt;<br \/>\n&lt;input type=button value=&#8221;\u5237\u65b05&#8243; onclick=&#8221;window.parent.frames.item(&#8216;bottom&#8217;).location.reload()&#8221;&gt;&lt;br&gt;<br \/>\n&lt;input type=button value=&#8221;\u5237\u65b06&#8243; onclick=&#8221;window.parent.bottom.location.reload()&#8221;&gt;&lt;br&gt;<br \/>\n&lt;input type=button value=&#8221;\u5237\u65b07&#8243; onclick=&#8221;window.parent[&#8216;bottom&#8217;].location.reload()&#8221;&gt;&lt;br&gt;<br \/>\n&lt;\/BODY&gt;<br \/>\n&lt;\/HTML&gt;<\/div>\n<p>\u4e0b\u9762\u662fbottom.html\u9875\u9762\u6e90\u4ee3\u7801\uff0c\u4e3a\u4e86\u8bc1\u660e\u4e0b\u65b9\u9875\u9762\u7684\u786e\u88ab\u5237\u65b0\u4e86\uff0c\u5728\u88c5\u8f7d\u5b8c\u9875\u9762\u5f39\u51fa\u4e00\u4e2a\u5bf9\u8bdd\u6846\u3002<\/p>\n<div class=\"codetitle\"><a id=\"copybut73194\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code73194\" class=\"codebody\">&lt;!DOCTYPE HTML PUBLIC &#8220;-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN&#8221;&gt;<br \/>\n&lt;HTML&gt;<br \/>\n&lt;HEAD&gt;<br \/>\n&lt;TITLE&gt; bottom.html &lt;\/TITLE&gt;<br \/>\n&lt;\/HEAD&gt;<br \/>\n&lt;BODY onload=&#8221;alert(&#8216;\u6211\u88ab\u52a0\u8f7d\u4e86\uff01&#8217;)&#8221;&gt;<br \/>\n&lt;h1&gt;This is the content in bottom.html.&lt;\/h1&gt;<br \/>\n&lt;\/BODY&gt;<br \/>\n&lt;\/HTML&gt;<\/div>\n<p>\u89e3\u91ca\u4e00\u4e0b\uff1a<\/p>\n<div class=\"codetitle\"><a id=\"copybut48627\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code48627\" class=\"codebody\">1.window\u6307\u4ee3\u7684\u662f\u5f53\u524d\u9875\u9762\uff0c\u4f8b\u5982\u5bf9\u4e8e\u6b64\u4f8b\u5b83\u6307\u7684\u662ftop.html\u9875\u9762\u3002<br \/>\n2.parent\u6307\u7684\u662f\u5f53\u524d\u9875\u9762\u7684\u7236\u9875\u9762\uff0c\u4e5f\u5c31\u662f\u5305\u542b\u5b83\u7684\u6846\u67b6\u9875\u9762\u3002\u4f8b\u5982\u5bf9\u4e8e\u6b64\u4f8b\u5b83\u6307\u7684\u662fframedemo.html\u3002<br \/>\n3.frames\u662fwindow\u5bf9\u8c61\uff0c\u662f\u4e00\u4e2a\u6570\u7ec4\u3002\u4ee3\u8868\u7740\u8be5\u6846\u67b6\u5185\u6240\u6709\u5b50\u9875\u9762\u3002<br \/>\n4.item\u662f\u65b9\u6cd5\u3002\u8fd4\u56de\u6570\u7ec4\u91cc\u9762\u7684\u5143\u7d20\u3002<br \/>\n5.\u5982\u679c\u5b50\u9875\u9762\u4e5f\u662f\u4e2a\u6846\u67b6\u9875\u9762\uff0c\u91cc\u9762\u8fd8\u662f\u5176\u5b83\u7684\u5b50\u9875\u9762\uff0c\u90a3\u4e48\u4e0a\u9762\u7684\u6709\u4e9b\u65b9\u6cd5\u53ef\u80fd\u4e0d\u884c\u3002<br \/>\n\u9644\uff1a<br \/>\nJavascript\u5237\u65b0\u9875\u9762\u7684\u51e0\u79cd\u65b9\u6cd5\uff1a<br \/>\n1 history.go(0)<br \/>\n2 location.reload()<br \/>\n3 location=location<br \/>\n4 location.assign(location)<br \/>\n5 document.execCommand(&#8216;Refresh&#8217;)<br \/>\n6 window.navigate(location)<br \/>\n7 location.replace(location)<br \/>\n8 document.URL=location.href<\/div>\n<p>\u4e8c\u3001\u81ea\u52a8\u5237\u65b0\u9875\u9762<br \/>\n1.\u9875\u9762\u81ea\u52a8\u5237\u65b0\uff1a\u628a\u5982\u4e0b\u4ee3\u7801\u52a0\u5165&lt;head&gt;\u533a\u57df\u4e2d<br \/>\n&lt;meta http-equiv=&#8221;refresh&#8221; content=&#8221;20&#8243;&gt;<br \/>\n\u5176\u4e2d20\u6307\u6bcf\u969420\u79d2\u5237\u65b0\u4e00\u6b21\u9875\u9762.<br \/>\n2.\u9875\u9762\u81ea\u52a8\u8df3\u8f6c\uff1a\u628a\u5982\u4e0b\u4ee3\u7801\u52a0\u5165&lt;head&gt;\u533a\u57df\u4e2d<br \/>\n&lt;meta http-equiv=&#8221;refresh&#8221; content=&#8221;20;url=http:\/\/www.jb51.net&#8221;&gt;<br \/>\n\u5176\u4e2d20\u6307\u969420\u79d2\u540e\u8df3\u8f6c\u5230http:\/\/www.jb51.net\u9875\u9762<br \/>\n3.\u9875\u9762\u81ea\u52a8\u5237\u65b0js\u7248<\/p>\n<p>&lt;script language=&#8221;JavaScript&#8221;&gt;<br \/>\nfunction myrefresh()<br \/>\n{<br \/>\nwindow.location.reload();<br \/>\n}<br \/>\nsetTimeout(&#8216;myrefresh()&#8217;,1000); \/\/\u6307\u5b9a1\u79d2\u5237\u65b0\u4e00\u6b21<br \/>\n&lt;\/script&gt;<br \/>\n\u4e09\u3001java\u5728\u5199Servler,Action\u7b49\u7a0b\u5e8f\u65f6\uff0c\u8981\u64cd\u4f5c\u8fd4\u56de\u9875\u9762\u7684\u8bdd\uff08\u5982\u8c08\u51fa\u4e86\u7a97\u53e3\uff0c\u64cd\u4f5c\u5b8c\u6210\u4ee5\u540e\uff0c\u5173\u95ed\u5f53\u524d\u9875\u9762\uff0c\u5237\u65b0\u7236\u9875\u9762\uff09<\/p>\n<div class=\"codetitle\"><a id=\"copybut22328\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code22328\" class=\"codebody\">1 PrintWriter out = response.getWriter();<br \/>\n2 out.write(&#8220;&lt;script type=\\&#8221;text\/javascript\\&#8221;&gt;&#8221;);<br \/>\n3 \/\/\/\/\u5b50\u7a97\u53e3\u5237\u65b0\u7236\u7a97\u53e3<br \/>\n4 out.write(&#8220;self.opener.location.reload();&#8221;);<br \/>\n5 \/\/\u5173\u95ed\u7a97\u53e3<br \/>\n6 out.write(&#8220;window.opener=null;&#8221;);<br \/>\n7 out.write(&#8220;window.close();&#8221;);<br \/>\n8 out.write(&#8220;&lt;\/script&gt;&#8221;);<\/div>\n<p>\u56db\u3001JS\u5237\u65b0\u6846\u67b6\u7684\u811a\u672c\u8bed\u53e5<br \/>\n1.\u5982\u4f55\u5237\u65b0\u5305\u542b\u8be5\u6846\u67b6\u7684\u9875\u9762\u7528<\/p>\n<div class=\"codetitle\"><a id=\"copybut74666\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code74666\" class=\"codebody\">&lt;script language=JavaScript&gt;<br \/>\nparent.location.reload();<br \/>\n&lt;\/script&gt;<\/div>\n<p>2.\u5b50\u7a97\u53e3\u5237\u65b0\u7236\u7a97\u53e3<\/p>\n<div class=\"codetitle\"><a id=\"copybut17651\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code17651\" class=\"codebody\">&lt;script language=JavaScript&gt;<br \/>\nself.opener.location.reload();<br \/>\n&lt;\/script&gt;<\/div>\n<p>3.\u5982\u4f55\u5237\u65b0\u53e6\u4e00\u4e2a\u6846\u67b6\u7684\u9875\u9762\u7528 \uff08\u4e0a\u9762\u7684\u5b9e\u4f8b\u4ee5\u8bf4\u660e\u4e86\uff09<\/p>\n<div class=\"codetitle\"><a id=\"copybut41813\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code41813\" class=\"codebody\">\u8bed\u53e51. window.parent.frames[1].location.reload();<br \/>\n\u8bed\u53e52. window.parent.frames.bottom.location.reload();<br \/>\n\u8bed\u53e53. window.parent.frames[&#8220;bottom&#8221;].location.reload();<br \/>\n\u8bed\u53e54. window.parent.frames.item(1).location.reload();<br \/>\n\u8bed\u53e55. window.parent.frames.item(&#8216;bottom&#8217;).location.reload();<br \/>\n\u8bed\u53e56. window.parent.bottom.location.reload();<br \/>\n\u8bed\u53e57. window.parent[&#8216;bottom&#8217;].location.reload();<\/div>\n<p>4.\u5982\u679c\u60f3\u5173\u95ed\u7a97\u53e3\u65f6\u5237\u65b0\u6216\u8005\u60f3\u5f00\u7a97\u65f6\u5237\u65b0\u7684\u8bdd\uff0c\u5728&lt;body&gt;\u4e2d\u8c03\u7528\u4ee5\u4e0b\u8bed\u53e5\u5373\u53ef\u3002<br \/>\n&lt;body onload=&#8221;opener.location.reload()&#8221;&gt;<br \/>\n\u5f00\u7a97\u65f6\u5237\u65b0<br \/>\n&lt;body onUnload=&#8221;opener.location.reload()&#8221;&gt;<br \/>\n\u5173\u95ed\u65f6\u5237\u65b0<\/p>\n<div class=\"codetitle\"><a id=\"copybut69326\" class=\"copybut\"><\/a><u>\u590d\u5236\u4ee3\u7801<\/u>\u4ee3\u7801\u5982\u4e0b:<\/div>\n<div id=\"code69326\" class=\"codebody\">&lt;script language=&#8221;javascript&#8221;&gt;<br \/>\nwindow.opener.document.location.reload()<br \/>\n&lt;\/script&gt;<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0d\u77e5\u9053\u4e3a\u5565\u5728html5\u4e2d\u548c\u8c37\u6b4c\u6d4f\u89c8\u5668\u4e2d\u6d4b\u8bd5\u53ea\u6709\u8fd9\u53e5\u597d\u7528 &lt;a onclick=&#8221;window.location.href=window.location.href;&#8221;&gt;&lt;\/a&gt; \u4ee5\u4e0b\u6d4b\u8bd5\u6709\u7684\u597d&#8230;<\/p>\n","protected":false},"author":1,"featured_media":67270,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,1],"tags":[132,23,133],"topic":[],"class_list":["post-67269","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-htmlcss","category-technology","tag-javascript","tag-js","tag-133"],"_links":{"self":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/67269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/comments?post=67269"}],"version-history":[{"count":2,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/67269\/revisions"}],"predecessor-version":[{"id":67272,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/posts\/67269\/revisions\/67272"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media\/67270"}],"wp:attachment":[{"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/media?parent=67269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/categories?post=67269"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/tags?post=67269"},{"taxonomy":"topic","embeddable":true,"href":"http:\/\/www.xiaoyebailong.com\/index.php\/wp-json\/wp\/v2\/topic?post=67269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}