锘??xml version="1.0" encoding="utf-8" standalone="yes"?> 榪欐槸涓涓浘緇忚澶氭璁ㄨ榪囩殑闂錛岄暱鏈熶互鏉ワ紝鎴戜篃涓鐩存槸榪欐牱鍐欑殑銆傝浜? 鎴栬?
浠ュ線澶у涓嶄嬌鐢?#"鐨勯棶棰樻槸錛岃繖灝嗗鑷寸偣鍑婚摼鎺ユ椂欏甸潰璺沖洖欏甸潰欏墮儴錛屼絾閫氳繃 return false 璇彞灝嗕嬌寰楁祻瑙堝櫒蹇界暐閾炬帴鐨勯粯璁ゅ姩浣滐紝浠庤岄伩鍏嶄簡姝ら棶棰樸?
youngpup 鏇存湁鎰忔濓紝浠栧湪 浠栫殑瑙e喅鏂規鏄細 榪欐牱鐨勫ソ澶勫氨鏄彲浠ヤ繚瀛樺埌涔︾鎴栬呮敹钘忓す錛屽彲浠ュ乏閿崟鍑伙紝涔熷彲浠ュ彸閿嬌鐢紒 <a href="javascript:void(0)" onclick="doSomething();returnfalse;">Link</a>
a href=鈥漥avascript:void(0);鈥?鈥?avoid the void 涔嬪悗錛屾垜璁ゅ悓浜嗕綔鑰呯殑鎰忚銆備笅闈㈢殑鍐欐硶紜疄鏇村悎鐞嗭細
<a href="#" onclick="doSomething();returnfalse;">Link</a>
<script type="javascript">
function doSomething() {
//doSomething
returnfalse;
}
</script>
<a href="#" onclick="return doSomething();">Link</a>
How to Create Pop-Up Windows 涓█杈炴縺鐑堢殑鍊″澶у姘歌繙姘歌繙姘歌繙涓嶈浣跨敤 javascript: 浼崗璁細
Never, ever, ever use the javascript: pseudo-protocol for anything, ever ever ever ever again. Please. Pretty please.
<a
href="http://google.com/"
onclick="window.open(this.href, 'popupwindow',
'width=400,height=300,scrollbars,resizable');
returnfalse;">
]]>
聽聽聽聽聽
聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽 榪欎釜闂鎴戜互鍓嶉亣鍒拌繃錛屼竴鐩存病鏈夎緇嗙殑鍘繪繁絀跺師鍥狅紝鍙槸浠ヤ負鏄湇鍔″櫒鍏抽棴榪炴帴澶揩鐨勫師鍥犮備粖澶╁彂鐜拌繖涓棶棰樺嚭鐨勫緢棰戠箒錛屾湇鍔″櫒鏂歸潰娌℃湁鏀逛粈涔堬紝鍙槸涓婁紶浜嗘柊鐨勯〉闈㈢▼搴忚屽凡錛屽簲璇ヤ笉浼氬拰鏈嶅姟鍣ㄦ湁鍏熾傚湪瀵歸〉闈㈣繘琛屽垎鏋愶紝騫舵悳绱簡涓涓嬬綉涓婏紝鍙戠幇鍘熸潵鏄痡s鍦╠ocument榪樻病瀹屽叏load瀹岀殑鏃跺欏氨璇曞浘鏀瑰彉鍏跺煎鑷淬?br />
聽聽聽聽聽聽聽 鍥犳瀵筳s鍋氬涓嬫敼鍙橈細
鍘焜s錛?br />
聽聽聽聽 window.settimeout("go()",500);
聽聽聽聽 function go(){
聽聽聽 .......
聽聽聽聽 }
鏀規垚錛?br />
var go_i=window.setInterval("go()",500);
function go(){
聽聽聽if(document.readyState=="complete"){
聽聽聽聽聽 window.clearInterval(go2_i);
聽聽聽 }
聽聽聽聽else return;
聽聽聽 ........
}
鐩殑灝辨槸璁╀粬涓瀹氳鍦╠ocument瀹屾垚鍚庢墠鎵ц閭d釜鎿嶄綔
]]>
浠婂ぉ鍙戠幇錛屽鏋渋frame鍜宲arent鍦ㄥ悓涓涓笁綰у煙鍚嶄笅錛屾瘮濡傞兘鏄痑a.bb.com錛岄偅璁句簡document.domain鍙嶈屼細閫犳垚璁塊棶鎷掔粷銆?br />
鏌ヤ簡涓婱SDN錛屾湁濡備笅瑙i噴錛?br />
Remarks
The property initially returns the host name of the server from which the page is served. The property can be assigned the domain suffix to allow sharing of pages across frames. For example, a page in one frame from home.microsoft.com and a page from www.microsoft.com initially would not be able to communicate with each other. However, by setting the domain property of both pages to the suffix "microsoft.com", you ensure that both pages are considered secure and access is available between the pages.
When you set the domain property, use the domain name determined by the server rather than by the client browser.
All the pages on different hosts must have the domain property explicitly set to the same value to communicate successfully with each other. For example, the value of the domain property of a page on the host microsoft.com would be "microsoft.com" by default. It might seem logical that if you set the domain property of a page on another host named msdn.microsoft.com to "microsoft.com," that the two pages could communicate with each other. However, this is not the case unless you have also explicitly set the domain property of the page on microsoft.com to "microsoft.com".
Furthermore, this property cannot be used to allow cross-frame communication among frames with different domain suffixes. For example, a page in one frame from www.microsoft.com and a page in another frame from www.msn.com would not be able to communicate with each other even if the domain property of both pages was set to the suffix "microsoft.com".
Security Alert聽聽Using this property incorrectly can compromise the security of your Web site. Set the domain property only if you must allow cross-domain scripting. Use a value determined on the server. Setting this property to a value determined on the client (like through the location object) could expose your site to attack from another site through Domain Name System (DNS) manipulation. For more information, see Security Considerations: Dynamic HTML.
For more information on domain security, see About Cross-Frame Scripting and Security.