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

JavaScript Óï·¨¼¯½õ

 JavaScriptÓï·¨¼¯½õÊǶÔjavascript³£Óú¯ÊýµÄһЩС½á£¬±È½ÏʵÓ㬽¨ÒéÊղأ¬·½±ã²éÕÒÐèÒªµÄ×ÊÁÏ¡£
click() ¶ÔÏó.click() ʹ¶ÔÏó±»µã»÷¡£ 
closed ¶ÔÏó.closed ¶ÔÏó´°¿ÚÊÇ·ñÒѹرÕtrue/false 
clearTimeout(¶ÔÏó) Çå³ýÒÑÉèÖõÄsetTimeout¶ÔÏó 
clearInterval(¶ÔÏó) Çå³ýÒÑÉèÖõÄsetInterval¶ÔÏó 
confirm("ÌáʾÐÅÏ¢") µ¯³öÈ·ÈÏ¿ò£¬È·¶¨·µ»ØtrueÈ¡Ïû·µ»Øfalse 
cursor:Ñùʽ ¸ü¸ÄÊó±êÑùʽ hand crosshair text wait help default auto e/s/w/n-resize 
event.clientX ·µ»Ø×îºóÒ»´Îµã»÷Êó±êX×ø±êÖµ£» 
event.clientY ·µ»Ø×îºóÒ»´Îµã»÷Êó±êY×ø±êÖµ£» 
event.offsetX ·µ»Øµ±Ç°Êó±êÐüÍ£X×ø±êÖµ 
event.offsetY ·µ»Øµ±Ç°Êó±êÐüÍ£Y×ø±êÖµ 
document.write(document.lastModified) ÍøÒ³×îºóÒ»´Î¸üÐÂʱ¼ä 
document.ondblclick=x µ±Ë«»÷Êó±ê²úÉúʼþ 
document.onmousedown=x µ¥»÷Êó±ê¼ü²úÉúʼþ 
document.body.scrollTop; ·µ»ØºÍÉèÖõ±Ç°ÊúÏò¹ö¶¯ÌõµÄ×ø±êÖµ£¬ÐëÓ뺯ÊýÅäºÏ, 
document.body.scrollLeft; ·µ»ØºÍÉèÖõ±Ç°ºáÏò¹ö¶¯ÎñµÄ×ø±êÖµ£¬ÐëÓ뺯ÊýÅäºÏ£¬ 
document.title document.title="message"; µ±Ç°´°¿ÚµÄ±êÌâÀ¸ÎÄ×Ö 
document.bgcolor document.bgcolor="ÑÕɫֵ"; ¸Ä±ä´°¿Ú±³¾°ÑÕÉ« 
document.Fgcolor document.Fgcolor="ÑÕɫֵ"; ¸Ä±äÕýÎÄÑÕÉ« 
document.linkcolor document.linkcolor="ÑÕɫֵ"; ¸Ä±ä³¬Áª½ÓÑÕÉ« 
document.alinkcolor document.alinkcolor="ÑÕɫֵ"; ¸Ä±äÕýµã»÷Áª½ÓµÄÑÕÉ« 
document.VlinkColor document.VlinkColor="ÑÕɫֵ"; ¸Ä±äÒÑ·ÃÎÊÁª½ÓµÄÑÕÉ« 
document.forms.length ·µ»Øµ±Ç°Ò³form±íµ¥Êý 
document.anchors.length ·µ»Øµ±Ç°Ò³ÃªµÄÊýÁ¿ 
document.links.length ·µ»Øµ±Ç°Ò³Áª½ÓµÄÊýÁ¿ 
document.onmousedown=x µ¥»÷Êó±ê´¥·¢Ê¼þ 
document.ondblclick=x Ë«»÷Êó±ê´¥·¢Ê¼þ 
defaultStatus window.status=defaultStatus; ½«×´Ì¬À¸ÉèÖÃĬÈÏÏÔʾ 
function function xx(){...} ¶¨Ò庯Êý 
isNumeric ÅжÏÊÇ·ñÊÇÊý×Ö 
innerHTML xx=¶ÔÏó.innerHTML ÊäÈëij¶ÔÏó±êÇ©ÖеÄhtmlÔ´´úÂë 
innerText divid.innerText=xx ½«ÒÔdiv¶¨Î»ÒÔidÃüÃûµÄ¶ÔÏóÖµÉèΪXX 
location.reload(); ʹ±¾Ò³Ë¢Ð£¬target¿ÉµÈÓÚÒ»¸öˢеÄÍøÒ³ 
Math.r


Ïà¹ØÎĵµ£º

JavaScript »ñÈ¡¶ÔÏóµÄ¸ß¶ÈºÍ¿í¶ÈÏêϸ˵Ã÷

scrollHeight: »ñÈ¡¶ÔÏóµÄ¹ö¶¯¸ß¶È¡£
scrollLeft:ÉèÖûò»ñȡλÓÚ¶ÔÏó×ó±ß½çºÍ´°¿ÚÖÐĿǰ¿É¼ûÄÚÈݵÄ×î×ó¶ËÖ®¼äµÄ¾àÀë
scrollTop:ÉèÖûò»ñȡλÓÚ¶ÔÏó×î¶¥¶ËºÍ´°¿ÚÖпɼûÄÚÈݵÄ×î¶¥¶ËÖ®¼äµÄ¾àÀë
scrollWidth:»ñÈ¡¶ÔÏóµÄ¹ö¶¯¿í¶È
offsetHeight:»ñÈ¡¶ÔÏóÏà¶ÔÓÚ°æÃæ»òÓɸ¸×ø±ê offsetParent ÊôÐÔÖ¸¶¨µÄ¸¸×ø±êµÄ¸ß¶È
offsetL ......

JavascriptË¢ÐÂÒ³Ãæ

1 history.go(0)
2 location.reload()
3 location=location
4 location.assign(location)
5 document.execCommand('Refresh')
6 window.navigate(location)
7 location.replace(location)
8 document.URL=location.href
×Ô¶¯Ë¢ÐÂÒ³ÃæµÄ·½·¨:
1¡¢×Ô¶¯Ë¢Ð£º
<script type="text/javascript">setInt ......

Javascript »ñÈ¡ÍøÒ³¸÷¸ß¶È²ÎÊý

 <SCRIPT   LANGUAGE="JavaScript"> 
  var     s   =   ""; 
  s   +=   "\r\nÍøÒ³¿É¼ûÇøÓò¿í£º"+   document.body.clientWidth; 
  s   +=   "\r\nÍøÒ³¿É¼ûÇøÓò¸ß ......

javascript event ʼþ½âÎö

 ÃèÊö event´ú±íʼþµÄ״̬£¬ÀýÈç´¥·¢event¶ÔÏóµÄÔªËØ¡¢Êó±êµÄλÖü°×´Ì¬¡¢°´ÏµļüµÈµÈ¡£ event¶ÔÏóÖ»ÔÚʼþ·¢ÉúµÄ¹ý³ÌÖвÅÓÐЧ¡£  eventµÄijЩÊôÐÔÖ»¶ÔÌØ¶¨µÄʼþÓÐÒâÒå¡£±ÈÈ磬fromElement ºÍ toElement ÊôÐÔÖ»¶Ô onmouseover ºÍ  onmouseout ʼþÓÐÒâÒå¡£ Àý×Ó ÏÂÃæµÄÀý×Ó¼ì²éÊó±êÊÇ·ñÔÚÁ´½ÓÉ ......

javascriptÊ®½øÖÆ×ª¶þ½øÖÆ£¬¶þ½øÖÆ×ªÊ®½øÖÆ


alert(parseInt("101101", 2))

ÔËÐдúÂë

function toBin(intNum) {
var answer = "";
if(/\d+/.test(intNum)) {
while(intNum != 0) {
answer = Math.abs(intNum%2)+answer;
intNum = parseInt(intNum/2);
}
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ