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

ʵÓÃµÄ JavaScript ²âÊÔ¼°Ð§Ñ鹤¾ß

JavaScript ÊÇÒ»¿îÇ¿´óµÄ¹ã·ºÔËÓÃÓÚÏÖ´úWebÕ¾µã¼°Ó¦ÓõĽű¾ÓïÑÔ¡£×÷Ϊһ¸ö¼¼ÒÕ¾«Õ¿µÄ Web ¿ª·¢Õߣ¬ÕÆÎÕJavaScript¿ÉÒÔÔöÇ¿Óû§µÄʹÓÃÌåÑ飬Ìṩ½»»¥¼°¸»¿Í»§¶ËµÈ¹¦ÄÜ¡£
¾¡¹ÜJavaScript µÄÓï·¨·Ç³£¼òµ¥£¬µ«¶ÔÓÚд³ÌÐò¶øÑÔÈÔÈ»ÊÇÀ§ÄÑÖØÖØ£¬¾ÍÊÇÒòΪËüµÄÔËÐл·¾³£º»ùÓÚWebä¯ÀÀÆ÷¡£
ÒÔÏÂÄú¿ÉÒÔ¿´µ½ÊÕ¼¯µÄ8¸öʵÓÃµÄ JavaScript ²âÊÔ¼°Ð§Ñ鹤¾ß£¬ËüÃǶ¼¿ÉÒÔÔÚ²»Í¬»·¾³Ï½øÐе¥Ôª²âÊÔ¼°Ð£Ñé²âÊÔÄúµÄ½Å±¾¡£
JSLint
JSLintÊÇ»ùÓÚWebµÄÑéÖ¤JavaScript´íÎó´úÂëµÄ¹¤¾ß¡£ËüÓµÓеŦÄܼ°Ìض¨µÄÉèÖÃÀ´Ê¹ÓÃÄúµÄÐèÇó£¬×Ô¶¨ÒåÄãµÄÑéÖ¤Ëã·¨¡£
JsUnit
JsUnitÊÇÒ»¿îÔÚ¿Í»§¶Ë(ÔÚä¯ÀÀʱ)µÄµ¥Ôª²âÊÔJavaScript¿ò¼Ü¡£¶ÔJavaScript¶øÑÔ£¬JUnit¾ÍÏñÊÇËüµÄÒ»¸ö¶Ë¿Ú¡£µ±È»ËüÒ²¿ÉÒÔÔÚ¶à ¸öä¯ÀÀÆ÷¡¢¶à¸ö»úÆ÷µÄ²»Í¬²Ù×÷ϵͳÖÐ×Ô¶¯ÔËÐС£ËüµÄ·¢Õ¹Ê¼ÓÚ2001Äê1Ô¡£
J3Unit
J3UnitÊÇÒ»¸öÃæÏò¶ÔÏóµÄJavaScriptµ¥Ôª²âÊÔ¿ò¼Ü¡£J3UnitÔÚÍøÒ³ä¯ÀÀÆ÷ÖÐÖ±½ÓÔËÐÐJavaScriptµÄ²âÊÔ£¬Ò²¿ÉÒÔ×Ô¶¯ÔËÐÐ JUnit ºÍ Jetty¡£J3UnitÊǽ¨Á¢ÔÚJUintºÍScript.aculo.usµÄ»ù´¡Ö®ÉÏÀ´¸üºÃµØʵÏÖ×Ô¶¯ÔËÐÐJavaScript µ¥Ôª²âÊÔ¡£ÃæÏò¶ÔÏóµÄJavaScriptµ¥Ôª²âÊÔÊÇÓÉScript.aculo.usµÄTest.Unit.Runner¶ÔÏó±àдµÄ£¬»ùÓÚ prototype JavaScript¿â¡£
Crosscheck
CrosscheckÊÇÒ»¿î¿ªÔ´µÄУÑéä¯ÀÀÆ÷ÖеÄJavaScript²âÊÔ¿ò¼Ü¡£Ëü¿ÉÒÔ°ïÖúÄúÔÚ²»Í¬µÄä¯ÀÀÆ÷ÖУ¬ÖîÈ磺Internet Explorer¡¢FirefoxµÈ£¬¶ø²»ÐèÒªÒ» Ò»°²×°ËûÃÇÀ´È·ÈÏÄúµÄ´úÂëÊÇ·ñÕýÈ·¡£ÄúΨһÐèÒªµÄÊDZØÐëÒªÓÐJavaÐéÄâ»ú»·¾³¡£
YUI Test
YUI²âÊÔÊÇÒ»¿î»ùÓÚä¯ÀÀÆ÷£¬Ìṩ½â¾ö·½°¸µÄ²âÊÔ¿ò¼Ü¡£Ê¹ÓÃYUI£¬Äú¿ÉÒÔ·½±ãµØÌí¼Óµ¥Ôª²âÊÔ£¬Ñ°ÇóJavaScript½â¾ö·½°¸¡£ËüÊÇÓÉ Yahoo! UI Library¿ª·¢µÄÒ»¸öJavaScriptMVC²âÊÔ²å¼þ£¬Äܹ»ÈÃÄãÄ£·¶´ó²¿·ÖDOM¶¯×÷£¬±ÈÈçд£¬ÍÏק£¬±ÈÈçÄ£·¶AJAXÏìÓ¦£¬²¢ÇÒÄܹ»Ê¹ÓöÏÑÔ (assertions)¡£ËüÄܹ»Ïóº¯ÊýÒ»ÑùÔËÐУ¬²¢ÇÒÄܹ»ÔÚ²»Í¬µÄconsole´°¿Ú½øÐм¯³É²âÊÔ¡£ËäÈ»Ëü²»ÊÇÔÚÈκΠxUnit ¿ò¼Ü»ù´¡ÉÏ¿ª·¢¶øÀ´£¬µ«YUI TestÈÔÈ»ÓкܶànUnit ºÍ JUnitµÄËù¾ßÓеÄÌØÐÔ¡££¨ While not a direct port from any specific xUnit framework, YUI Test does derive some characteristics from nUnit and JUnit. Õâ¶Î·­ÒëµÃ²»ºÃ£¬µ«ÏàÐÅ´óÖÂÒâ˼ÊǶԵģ©¡£
Regular Expression Tool
Regular Expression Tool£¨ÕýÔò±í´ïʽ¹¤¾ß£©ÊÇÒ»¿îÔÚÏß¹¤¾ß£¬ÓÃÀ´²âÊÔÄúµÄÕýÔò±í´ïʽ´úÂëÊÇ·ñÕýÈ·¡£µ±ÄúÏë¿ìËÙ²âÊÔ¸÷ÖÖÎı¾Àý×ÓµÄÕýÔò±í´ïʽʱ·Ç³£µÃÐÄÓ¦ÊÖ¡£
JS


Ïà¹ØÎĵµ£º

javascriptʵÏÖÈÕÆÚÐÇÆÚµÄÏÔʾ

<html>
<body>
<mce:script language=javascript><!--
todayDate = new Date();
date = todayDate.getDate();
month= todayDate.getMonth() +1;
year= todayDate.getYear();
document.write("½ñÌìÊÇ")
document.write("<br>")
if(navigator.appName == "Netscape")
{
document.w ......

javascript ÔØÈëͼƬºóÖ´ÐÐij²Ù×÷

function EnhancedImage(src,onLoaded){
var self = this;
this.src = src;
this.width = 0;
this.height = 0;
this.onLoaded = onLoaded;
this.loaded = false;
this.image = null;

this.load = function(){
if(this.loaded)
return;
this. ......

JavaScript ʱÖÓ£¨´úÂ룩

JavaScript ʱÖÓ£¨´úÂ룩:
<html>
<body onload=aaa()>
<script type="text/javascript">
var nowtime ;
var year ;
var month ,date,hours,minutes,seconds,all;
function aaa()
{
nowtime = new Date();
year = nowtime.getYear();
month = nowtime.getMonth()+1;
date = nowtim ......

һЩjavascript¼¼ÇÉ

¼òÂÔÓï¾ä
JavaScript ¿ÉÒÔʹÓüòÂÔÓï¾ä¿ìËÙ´´½¨¶ÔÏóºÍÊý×飬±ÈÈçÏÂÃæµÄ´úÂ룺
¿ÉÒÔʹÓüòÂÔÓï¾äÈçÏ£º
¶ÔÏó car ¾Í´Ë´´½¨£¬²»¹ýÐèÒªÌرð×¢Ò⣬½áÊø»¨À¨ºÅÇ°Ò»¶¨²»Òª¼Ó ";" ·ñÔòÔÚ IE »áÓöµ½ºÜ´óÂé·³¡£
´´½¨Êý×éµÄ´«Í³·½·¨ÊÇ£º
ʹÓüòÂÔÓï¾äÔò£º
ÁíÒ»¸ö¿ÉÒÔʹÓüòÂÔÓï¾äµÄµØ·½ÊÇÌõ¼þÅжÏÓï¾ä£º
¿ÉÒÔ¼òÂÔΪ£ ......

javascript »ñÈ¡·þÎñÆ÷ʱ¼ä

µ±ÐèÒªÔÚÍøÒ³ÖÐÏÔʾʱ¼äʱ¿ÉÒÔÓõ½ÏÂÃæÕâ¶Î´úÂ룺
<SCRIPT language=JavaScript type=text/JavaScript>
var day="";
var month="";
var ampm="";
var ampmhour="";
var myweekday="";
var year="";
mydate=new Date();
myweekday=mydate.getDay();
mymonth=mydate.getMonth()+1;
myday= mydate.getDate(); ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ