javascriptÐÔÄÜÓÅ»¯
ºÜ¾Ã¾ÍÏë×ܽáһϹØÓÚjavascriptÐÔÄÜÓÅ»¯·½ÃæµÄһЩ¶«Î÷£¬Æ½Ê±Ò²ÓÐ×¢ÒâÊÕ¼¯Õâ·½ÃæµÄ×ÊÁÏ¡£°Ñdel.icio.usÀïµÄÊղصĶ«Î÷·³öÀ´¿´Ò»±é£¬²Å¾ªÆæµØ·¢ÏÖ£¬ÕâЩËùνµÄÓÅ»¯·½·¨´ó¶à³ö×Ô¡¶javascript¸ß¼¶³ÌÐòÉè¼Æ¡·Ò»Ê飬µ±È»Ò²Óиö±ð
²»Ò»ÑùµÄ¡£×ÜÖ®Õâ±¾ÊéÉϹØÓÚjavascriptÐÔÄÜÓÅ»¯µÄÄÚÈÝ×ã×ãÓÃÁ˽ü20Ò³À´½øÐвûÊö£¬ËùÒÔ½ñÌìÎÒÒ²ÕÕ±¾Ðû¿ÆµØÀ´½éÉÜһϣ¬Í¬Ê±ÊÕ¼ÆäËû·½·¨¡£
javascriptµÄÐÔÄÜÓÅ»¯Ó¦·ÖΪÁ½²¿·Ö£ºÏÂÔØʱ¼äºÍÖ´ÐÐʱ¼ä¡£
ÏÂÔØʱ¼ä
javascript×÷ΪһÖÖ½âÊÍÐÔÓïÑÔ²»Í¬ÓÚÆäËû±à³ÌÓïÑÔ¡£ÔÚÖîÈçjava,c,c++µÄÓïÑÔÖУ¬¿ª·¢ÈËÔ±¸ù±¾ÎÞÐ迼ÂDZäÁ¿ÃûµÄ³¤¶ÈÒÔ¼°³¤Æª´óÂÛµÄ×¢ÊÍ£¬ÒòΪÕâЩÔÚ±àÒëʱ¶¼»á±»É¾³ý¡£
µ«ÊÇwebä¯ÀÀÆ÷ÏÂÔصÄÊÇjavascriptµÄÔ´´úÂ룬Äã±àдµÄjavascript³ÌÐòÎļþ»áÔÄ£ÔÑùµØÏÂÔص½¿Í»§¶Ë¡£¶øÕâЩ³¤±äÁ¿ÃûºÍ×¢ÊÍ
¾Í»áÓ°Ïì½Å±¾µÄÏÂÔØʱ¼ä¡£µ¥¸öTCP-IP°üÖÐÄÜ·ÅÈëµÄ×Ö½ÚÊýÊÇ1160£¬ËùÒÔ×îºÃ½«Ã¿¸öjavascriptÎļþµÄ´óС¿ØÖÆÔÚ1160×Ö½ÚÒÔÄÚÒÔ»ñÈ¡×î
ÓŵÄÏÂÔØʱ¼ä¡£
javascriptÎļþÖеÄÈκÎ×Ö½Ú£¬²»¹ÜÊÇ¿Õ¸ñ£¬»¹ÊÇ»»Ðж¼»áÓ°ÏìjavascriptÎļþµÄÏÂÔØʱ¼ä£¬ËùÒÔÔÚ²¿ÊðÈκÎjavascriptÎļþ֮ǰ£¬¶¼Ó¦¸Ã¾¡¿ÉÄܵØÓÅ»¯½Å±¾ÎļþµÄÌå»ý¡£ÒÔÏÂÊÇһЩ³£ÓõÄÓÅ»¯javascriptÎļþ´óСµÄ·½·¨£º
1¡¢É¾³ý×¢ÊÍ
½Å±¾ÖеÄÈκÎ×¢ÊͶ¼Ó¦¸ÃÔÚ²¿Êð֮ǰ±»É¾³ý¡£ËäÈ»×¢ÊͶÔÓÚ¿ª·¢ÈËÔ±À´ËµÒâÒåÖش󣬵«ÔÚ²¿ÊðʱÕâЩעÊͶԿͻ§¶ËÓû§ÊÇûÓÐÈκÎʵÖÊÒâÒåµÄ£¬¶ø¸ü¿ÉŵÄ
ÊǺܶàjavascriptÔ´´úÂëÖеÄ×¢ÊÍ»á±È´úÂë¶àµÃ¶à¡£Òò´Ëɾ³ý×¢ÊÍÊÇËù¼ûjavascriptÎļþ´óС×îΪ·½±ãÓÐЧµÄ;¾¶¡£
2¡¢É¾³ýÖƱí·ûºÍ¿Õ¸ñ
ÓÖ¹æÂɵØËõ½ø´úÂëÓÐÔöÇ¿´úÂëµÄ¿ÉÔĶÁÐÔ£¬µ«ÊÇä¯ÀÀÆ÷/¿Í»§¶ËÓû§²¢²»ÐèÒªÕâЩ¶îÍâµÄÖƱí·ûºÍ¿É¸ö£¬ËùÒÔ×îºÃɾ³ýËüÃÇ£¬°üÀ¨º¯Êý²ÎÊý£¬¸³ÖµÓï¾äºÍ±È½Ï²Ù×÷·ûÖ®¼äµÄ¿Õ¸ñ£º
function doSomething ( arg1, arg2, arg3 ){
¡¡alert(arg1 + arg2 + arg3);
}
function doSomething(arg1,arg2,arg3){alert(arg1+arg2+arg3);}3¡¢É¾³ýËùÓл»ÐÐ
ºÍÇ°Ò»Ìõ¹æÔòÒ»Ñù£¬Ö»ÒªÄãÔÚ³ÌÐòµÄÿÐнáβ¶¼ÕýÈ·µØÌí¼ÓÁ˷ֺţ¬ÄÇô¾Í²»ÐèÒªÔÙÌí¼Ó»»ÐзûÁË¡£
4¡¢Ìæ»»±äÁ¿Ãû
´Ë·½·¨ºÜÎÞÁÄ£¬´óÖÂ×ö·¨¾ÍÊǽ«ËùÓбäÁ¿ÃûÌæ»»³ÉÎÞÒâÒåµÄ¼ò¶Ì±äÁ¿Ãû
ÒªÊÖ¶¯µØÍê³ÉÒÔÉÏËIJ½£¬ÔÚʵ¼ÊÖпÉÄÜ»áÓÐÒ»¶¨µÄÄѶȣ¬ÄÇôÏÂÃæµÄһЩÁ´½Ó¿ÉÄܶÔÄãÓÐËù°ïÖú¡£
ECMAScript Cruncher£ºhttp://saltstorm.net/depo/esc/
JSMin£¨The JavaScript Minifier£©: http://www.crockford.com/javascript/jsmin.html
Online
Ïà¹ØÎĵµ£º
1¡¢ÅжÏÊÇ·ñΪÄêÔÂÈÕʱ¼ä¸ñʽ
<script>
//È¥³ý×Ö·û´®Ê×β¿Õ¸ñ
String.prototype.trim = function()
{
return this.replace(/(^\s*)|(\s*$)/g, "");
}
//ÑéÖ¤ÊÇ·ñΪÈÕÆÚ
function validator(){
if(isDate(document.all.demo1.value.trim())==false){
&n ......
·½·¨1£º
1function CheckSelect()
2 {
3 var tb = document.getElementById("ctl00_ContentPlaceHolder1_chkYear");
4
5 for(var i=0;i < tb.rows.length;i+ ......
ÈýÖÖ²»Í¬Î»ÖõÄJavaScript´úÂëµÄд·¨
¿Í»§¶Ë½Å±¾JavaScriptÔÚд·¨ÉÏÆäʵÓкܶàÖÖ·½·¨£¬ËüÃǵķÅÖÃλÖÃÒ²·Ç³£Ö®¶à¡£¡£ ÏÂÃæÁоÙÔÚÈýÖÖ²»Í¬µÄµØ·½Ð´JavaScript´úÂ룬ʵÏÖµÄЧ¹û¶¼Êǵã»÷°´Å¥buttonµ¯³öalert¾¯¸æ¿ò
µÚÒ»ÖÖÊÇ×î³£¼ûµÄ£¬´úÂëÈçÏ html´úÂë
<input type="button" value="°´Å¥1" id=" ......
ÔÎÄ£ºÁõÎä|JavascriptÔõôÔÚÁ½¸ö´°ÌåÖ®¼ä´«Öµ
ÖÚËùÖÜÖªwindow.open() º¯Êý¿ÉÒÔÓÃÀ´´ò¿ªÒ»¸öд°¿Ú£¬ÄÇôÈçºÎÔÚ×Ó´°ÌåÖÐÏò¸¸´°Ìå´«ÖµÄØ£¬Æäʵͨ¹ýwindow.opener¼´¿É»ñÈ¡¸¸´°ÌåµÄÒýÓá£
ÈçÎÒÃÇн¨´°ÌåFatherPage.htm:
XML-Code:
<script type="text/javascript">
function OpenChildWindow()
{ ......
Ò»£¬¸ÅÊö
1£¬ÕýÔò±í´ïʽ£¬¿ÉÒÔ˵ÊÇÈκÎÒ»ÖÖ±à³ÌÓïÑÔ¶¼ÌṩµÄ»úÖÆ£¬ËüÖ÷ÒªÊÇÌṩÁ˶Ô×Ö·û´®µÄ´¦ÀíÄÜÁ¦¡£
2£¬ÕýÔò±í´ïʽÔÚÒ³Ãæ´¦ÀíÖеÄʹÓó¡¾°£º
1£©±íµ¥ÑéÖ¤¡£Ñé֤ijЩÓò·ûºÏijÖÖ¹æÔò£¬ÀýÈçÓʼþÊäÈë¿ò±ØÐëÊäÈëµÄÊÇÓʼþ¡¢ÁªÏµµç»°ÊäÈë¿òÊäÈëµÄ±ØÐëÊÇÊý×ֵȵÈ
2£©´¦ÀíDOMÄ£ÐÍ¡£ÀýÈçͨ¹ý±í´ïʽ¶¨Î»DOMÖеÄÒ»¸ö¶ÔÏó»òһϵÁ ......