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

javascript³£ÓÃÓ÷¨

javaScript ½ØÈ¡×Ö·û´®
Á½ÖÖ·½·¨£º
String.substr(N1,N2) Õâ¸ö¾ÍÊÇÎÒÃdz£ÓõĴÓÖ¸¶¨µÄλÖÃ(N1)½ØÈ¡Ö¸¶¨³¤¶È(N2)µÄ×Ö·û´®;
String.substring(N1,N2) Õâ¸ö¾ÍÊÇÎÒÃdz£ÓõĴÓÖ¸¶¨µÄλÖÃ(N1)µ½Ö¸¶¨µÄλÖÃ(N2)µÄ×Ö·û´®;
ÀýÈç
¶ÔÓÚhttp://localhost:8008index.aspx
substr(22,5)=substring(22,27)
Result:index
´òÓ¡±¾Ò³
<a href=javascriptvoid(0); onClick=javascriptwindow.print();return false;>[´òÓ¡±¾Ò³]</a>
¹Ø±Õ´°¿Ú
<a href=javascriptvoid(0); onClick=javascriptwindow.close();>[¹Ø±Õ´°¿Ú]</a>
javascriptÖÐûÓÐÕû³ýÔËËã·û,ÈçºÎʵÏÖÕû³ýѽ?±ÈÈç 10/3 ½á¹ûÊÇ3,¶ø²»ÊÇ3.33
alert(10/3|0);
document.getElementById()·½·¨¼òд,¶øÇÒÕâ¸öº¯Êý¸üˬµÄÊÇ£¬Èç¹ûÄãÏëËüÌá½»Ò»¸ö´ø¶à¸öidµÄÊý×éºó£¬ËûÒ²»áÏòÄã·µ»Ø¶à¸öÔªËصÄArray£¡
function $()
{
  var elements = new Array();
  for (var i = 0; i < arguments.length; i++)
  {
    var element = arguments[i];
    if (typeof element == 'string')
      element = document.getElementById(element);
    if (arguments.length == 1)
      return element;
    elements.push(element);
  }
  return elements;
}


Ïà¹ØÎĵµ£º

ÓÃJavascriptʵÏÖ¾²Ì¬¶ÔÏó¡¢¾²Ì¬·½·¨ºÍ¾²Ì¬ÊôÐÔ

JavascriptÓïÑÔµÄÃæÏò¶ÔÏóÌØÕ÷ºÜÈõ£¬ÆäËûÃæÏò¶ÔÏóÓïÑÔÔÚ´´½¨ÀàʱֻҪʹÓùؼü×Östatic¼´¿ÉÖ¸¶¨ÀàΪ¾²Ì¬À࣬JavascriptûÓÐÌṩstaticÕâÑùµÄ¹Ø¼ü×Ö£¬ÒªÈÃJavascriptÒ²¾ßÓГ¾²Ì¬”ÌØÐÔÖ»Óп¿Ò»Ð©“Ææ¼¼ÒùÇÉ”ÁË¡£
´úÂëÖÐÁоÙÁËÁ½ÖÖ¾²Ì¬·½·¨/ÊôÐÔµÄʵÏÖ·½Ê½£¬Ò»ÖÖÊǾ²Ì¬ÀàµÄ¾²Ì¬·½·¨ºÍÊôÐÔ£¬ÁíÒ»ÖÖÊǷǾ ......

Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â

Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â
Google ÅÅÃûÖÐµÄ 10 ¸ö×îÖøÃûµÄ JavaScript ¿â
ÎÄÕ·ÖÀà:WebÇ°¶Ë
 
 
JavaScript ÊÇ Web ¿ª·¢ÓëÉè¼ÆÖв»¿É»òȱµÄ¶«Î÷£¬²»¹ÜÊÇÒ»¸ö¼òµ¥µÄÍøÒ³»¹ÊÇÒ»¸öרҵµÄÕ¾µã£¬Ò²²»¹ÜÄãÊǸßÊÖ»¹ÊDzËÄñ£¬Èç½ñ JavaScript ¿âÔ½À´Ô½Ç¿´ó£¬¿ÉÒÔʤÈÎÐí¶à¸´ÔӵŤ×÷£¬È»¶øͬʱ£¬È ......

javascript»ù´¡

ÿһÏÊÇjsÖеÄС¼¼ÇÉ£¬µ«Ê®·ÖµÄʵÓã¡
1.document.write(""); Êä³öÓï¾ä
2.JSÖеÄ×¢ÊÍΪ//
3.´«Í³µÄHTMLÎĵµË³ÐòÊÇ:document->html->(head,body)
4.Ò»¸öä¯ÀÀÆ÷´°¿ÚÖеÄDOM˳ÐòÊÇ:window->(navigator,screen,history,location,document)
5.µÃµ½±íµ¥ÖÐÔªËصÄÃû³ÆºÍÖµ:document.getElementById("±íµ¥ÖÐÔªËØµÄ ......

javascript »ñÈ¡¹ö¶¯Ìõ¸ß¶È+³£ÓÃjsÒ³Ãæ¿í¶ÈÓë¸ß¶È

/********************
 * È¡´°¿Ú¹ö¶¯Ìõ¸ß¶È 
 ******************/
function getScrollTop()
{
    var scrollTop=0;
    if(document.documentElement&&document.documentElement.scrollTop)
    {
        ......

¡¾×ª¡¿Javascriptº¯ÊýÖд«µÝ´ø¿Õ¸ñµÄ²ÎÊý

Javascriptº¯ÊýÖд«µÝ´ø¿Õ¸ñµÄ²ÎÊý
       ͨ³£ÔÚÒ³ÃæÖÐÒªÈÃijЩÄÚÈݵã»÷ºó²úÉúµã»÷ʼþ£¨·ÇÒ³ÃæÌøת£©¶¼»áʹÓÃonclick£¬µ«ÊÇÕâÑù²»ÊÊÓÚÐèÒª´«µÝ²ÎÊýµÄÇé¿ö£¬ÓÚÊÇд³ÉÖ±½Óµ÷ÓÃJavascriptº¯ÊýµÄ·½Ê½£º<a href=javascript:somefunction(args)>content</a>¡£×¢Ò⣬ÕâôдÊÇÓÐÎÊÌâµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ