Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

href=¡°#¡±Óëhref=¡°javascript:void(0)¡±Çø±ð

ʹÓùýajaxµÄ¶¼³£¼ûÕâÑùµÄ´úÂ룺
<a href="javascript:doTest2();void(0);" mce_href="javascript:doTest2();void(0);">here</a>
µ«Õâ¶ùµÄvoid(0)¾¿¾¹ÊǺκ¬ÒåÄØ£¿
JavascriptÖÐvoidÊÇÒ»¸ö²Ù×÷·û£¬¸Ã²Ù×÷·ûÖ¸¶¨Òª¼ÆËãÒ»¸ö±í´ïʽµ«ÊDz»·µ»ØÖµ¡£
void ²Ù×÷·ûÓ÷¨¸ñʽÈçÏ£º
1. javascript:void (expression)
2. javascript:void expression
expression ÊÇÒ»¸öÒª¼ÆËãµÄ Javascript ±ê×¼µÄ±í´ïʽ¡£±í´ïʽÍâ²àµÄÔ²À¨ºÅÊÇÑ¡µÄ£¬µ«ÊÇдÉÏÈ¥ÊÇÒ»¸öºÃÏ°¹ß¡£ (ʵÏÖ°æ±¾ Navigator 3.0 )
ÄãÒÔʹÓà void ²Ù×÷·ûÖ¸¶¨³¬¼¶Á´½Ó¡£±í´ïʽ»á±»¼ÆË㵫ÊDz»»áµ±Ç°Îĵµ´¦×°ÈëÈκÎÄÚÈÝ¡£
ÏÂÃæµÄ´úÂë´´½¨ÁËÒ»¸ö³¬¼¶Á´½Ó£¬µ±Óû§ÒԺ󲻻ᷢÉúÈκÎÊ¡£µ±Óû§Á´½Óʱ£¬void(0) ¼ÆËãΪ 0£¬µ« Javascript ÉÏûÓÐÈκÎЧ¹û¡£
<A HREF="javascript:void(0)" mce_HREF="javascript:void(0)">µ¥´Ë´¦Ê²Ã´Ò²²»»á·¢Éú</A>
ÏÂÃæµÄ´úÂë´´½¨ÁËÒ»¸ö³¬¼¶Á´½Ó£¬Óû§µ¥Ê±»áÌá½»±íµ¥¡£
<A HREF="javascript:void(document.form.submit())" mce_HREF="javascript:void(document.form.submit())">
µ¥´Ë´¦Ìá½»±íµ¥</A>
a href=#Óë a href=javascript:void(0) µÄÇø±ð Á´½ÓµÄ¼¸ÖÖ°ì·¨
#°üº¬ÁËÒ»¸öλÖÃÐÅÏ¢
ĬÈϵÄêÊÇ#top Ò²¾ÍÊÇÍøÒ³µÄÉ϶Ë
¶øjavascript:void(0) ½ö½ö±íʾһ¸öËÀÁ´½Ó
Õâ¾ÍÊÇΪʲôÓеÄʱºòÒ³ÃæºÜ³¤ä¯ÀÀÁ´½ÓÃ÷Ã÷ÊÇ#ÊÇ
Ìø¶¯µ½ÁËÒ³Ê×
¶øjavascript:void(0) Ôò²»ÊÇÈç´Ë
ËùÒÔµ÷Óýű¾µÄʱºò×îºÃÓÃvoid(0)
»òÕß<input onclick>
<div onclick>µÈ
Á´½ÓµÄ¼¸ÖÖ°ì·¨
1.window.open(’’url’’)
2.ÓÃ×Ô¶¨Ò庯Êý
<mce:script type="text/javascript"><!--

function openWin(tag,obj)
{
obj.target="_blank";
obj.href = "Web/Substation/Substation.aspx?stationno="+tag;
obj.click();
}

// --></mce:script>
<a href="javascript:void(0)" mce_href="javascript:void(0)" onclick="openWin(3,this)">ÖêÖÞ</a>
window.location.href=""


Tags£ºhref=“#”Óëhre


Ïà¹ØÎĵµ£º

[·­Òë]High Performance JavaScript(025)

µÚ°ËÕ  Programming Practices  ±à³Ìʵ¼ù
    Every programming language has pain points and inefficient patterns that develop over time. The appearance of these traits occurs as people migrate to the language and start pushing its boundaries. Since 2005, when the term "Ajax" ......

[·­Òë]High Performance JavaScript(031)

Firebug
    Firefox is a popular browser with developers, partially due to the Firebug addon (available at http://www.getfirebug.com/), which was developed initially by Joe Hewitt and is now maintained by the Mozilla Foundation. This tool has increased the productivity of web develop ......

JavaScript±à³Ì±Ê¼Ç

ÐÂÖÐ……
1¡¢Êý¾ÝÀàÐÍÑéÖ¤ÎÊÌâ
  Asp.NetËäÈ»ÓÐÑéÖ¤¿Ø¼þ£¬µ«ÊÇÓÐЩ¸´ÔÓµÄÑéÖ¤»¹Êǵô«µ½·þÎñÆ÷ÉϽøÐУ¬ÓÃjsËٶȺÍÐÔÄܶ¼±È½ÏºÃ
<script>
 //¼ì²éÊÇ·ñΪÈÎÒâÊý£¨ÊµÊý£©
function isNumeric(strNumber) {
var newPar=/^(-|\+)?\d+(\.\d+)?$/
alert(newPar.test(strNumber)); }
 //¼ ......

ÈçºÎÎÒjavaScript»ñÈ¡´°¿ÚµÄ¸ß¶ÈºÍ¿í¶È

ÔÚjavascriptÖеõ½µ±Ç°´°¿ÚµÄ¸ßºÍ¿í
<body><SCRIPT LANGUAGE="JavaScript">
var  s = "";
s += "\r\nÍøÒ³¿É¼ûÇøÓò¿í£º"+ document.body.clientWidth;
s += "\r\nÍøÒ³¿É¼ûÇøÓò¸ß£º"+ document.body.clien ......

JavaScript ¶ÁÈ¡ JSON


JSON:
[{"subjecttypeId":"1","subjectName":"67","scope":"1",},{"subjecttypeId":"1","subjectName":"345","scope":"1"}]
JavaScript:
       var result = window.eval('(' + JSON+ ')');

for(var p in result){

result[p].subjectName;

alert(result[p] ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ