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

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);
}
if(answer.length == 0)
answer = "0";
return answer;
} else {
return 0;
}
}
alert(toBin(45))

ÔËÐдúÂë

function toBin(dec) {
var bits = [];
var dividend = dec;
var remainder = 0;
while (dividend >= 2) {
remainder = dividend % 2;
bits.push(remainder);
dividend = (dividend - remainder) / 2;
}
bits.push(dividend);
bits.reverse();
return bits.join("");
}
alert(toBin(45))

ÔËÐдúÂë


Ïà¹ØÎĵµ£º

jspÀïÃæǶÈëJavaScript

 Å¬Á¦ÁËÒ»ÌìÔÙ¼ÓÒ»Ì죬¾Íд¸ö½Å±¾»¹ÊDz»ÐС£Ôõô°ì¡£
ÏÂÃæµÄ´úÂëÓдíµÄ£¬Ö´Ðв»ÁË¡£ÔÝʱ»¹Ã»Óз¢ÏÖMyEclipseÀïÃæÈçºÎÀ´µ¥²½µ÷ÊÔ£¬¾ÍÏñÔÚvs2005ÀïÃæ¿ÉÒÔ°´×¡F10À´µ÷ÊÔ£¬¿´³ö×Ô¼ºµÄÄǸöÓï¾äд´íÁË£¬¶øÔÚÀïÖ»Äܹ»×Ô¼º¼ì²é£¬²éÁ˶àÉÙ±éÁËÒ²»¹ÊÇûÓÐÄܹ»·¢ÏÖÓÐʲô´íµÄ¡£´úÂëժ¼ÈçÏ£º
<script language="javaScript ......

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

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

JavaScript Google IG Drag Demo

 Ð§¹ûÑÝʾµØÖ·£ºhttp://www.phzzy.org/code/drag/google_drag.html
ÍÏקԭÀí£º
¹ØÓÚÍÏקµÄ»ù´¡£¬¿ÉÒԲο¼ÕâƪÎÄÕ£¬½²µÃ·Ç³£²»´í¡£
http://www.sohotx.com/mzk/index.php/1007/ArticleContent/298.html
ÆäʵԭÀíºÜ¼òµ¥£¬¾ÍÊÇ°Ñ°ó¶¨Èý¸öʼþ£ºonmousedown , onmousemove , onmouseup¡£
ÔÚÊó±êµãÏÂʱ(onmousedown)° ......

javascript event ʼþ½âÎö

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

Javascript֪ʶ¾«»ª(zhuan)

 
<script    language="JavaScript" type="text/javascript" >
<!--
         .
//-->
</script>
.languageÒѾ­±»ÆúÓ㬵«ÎªÁ˼æÈݾɰ汾ä¯ÀÀÆ÷¶ø±£Áô£¬ËùÒÔ½¨ÒéͬʱʹÓÃÕâlanguageºÍtypeÁ½¸ö
.<!---     / ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ