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

Javascript ÔÚ HTML Ò³Ãæ¹â±ê´¦ÊäÈë×Ö·û

insertAtCurson º¯Êý´úÁ½²ÎÊý·Ö±ðΪ¶ÔÏóºÍÊäÈëµÄ×Ö·û
    function insertAtCursor(myField, myValue)
    { 
        if (document.selection)
        { 
            myField.focus();
            sel = document.selection.createRange(); 
            sel.text = myValue; 
        }
        else if (myField.selectionStart || myField.selectionStart == "0")
        { 
            var startPos = myField.selectionStart;
            var endPos = myField.selectionEnd;
            myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);
        }
        else
        { 
            myField.value += myValue; 
        }
    }


Ïà¹ØÎĵµ£º

JavaScriptÖеÄJSON

Ô­Ö·£ºhttp://www.dreamdu.com/blog/2008/10/19/json_in_javascript/
JavaScriptÖеÄJSON
×÷ÕߣºDouglas Crockford
Ô­ÎÄÍøÖ·£ºhttp://www.json.org/js.html
ÒëÕߣº¿É°®µÄºï×Ó
JavaScriptÕâÖÖ±à³ÌÓïÑÔÊ×ÒªµÄÄ¿µÄÊÇΪNetscape NavigatorÌṩһÖÖÒ³Ãæ½Å±¾ÓïÑÔ¡£ËüÈÔ±»ÆÕ±éµÄÈÏΪÊÇJavaµÄÒ»¸ö×Ó¼¯£¬µ«ÊÂʵ²¢·ÇÈç´Ë¡£ËüÊ ......

JavaScriptÈëÃÅѧϰÊé¼®µÄ½×¶ÎÑ¡Ôñ


¶ÔÓÚÐí¶àÏëѧϰ JavaScript µÄÅóÓÑÀ´Ëµ£¬ÎÞÒÉÈçºÎÑ¡ÔñÈëÃŵÄÊé¼®ÊÇËûÃÇ×îÍ·ÌÛµÄÎÊÌ⣬»òÐíÒ²ÊÇËûÃÇһֱη¾å£¬ÉõÖÁ·ÅÆúѧϰ JavaScript µÄÀíÓÉ¡£
ÔÚ JavaScript ·½Ã棬×Ô¼º²»ÊÇʲôר¼Ò£¬Ò²²»ÊÇʲô¸ßÊÖ£¬µ«×Ô¼ºÒ»Â·×ßÀ´£¬JavaScript ´ÓÃÔãµ½ÈëµÀ£¬¶ÔÓÚ JavaScript Êé¼®µÄÈÏʶ»òÐí»¹ÓÐЩ½è¼ø¼ÛÖµ¡£
ÈëÃÅÍƼöÊ×Ñ¡Êé¼®£º¡ ......

JavaScriptÖеÄ5ÖÖʼþʹÓ÷½Ê½½â˵(ת)


JavaScriptÖеÄ5ÖÖʼþʹÓ÷½Ê½½â˵(ת)

Ϊ×é¼þÌṩʼþ´¦ÀíÈë¿Ú£¬¿ÉÒÔ¼«´óµÄÌá¸ß×é¼þµÄ·â±ÕÐÔ£¬Í¬Ê±ÓÖÄÜÈÃ×é¼þºÜºÃµÄºÍÍâ½çͨÐÅ¡£²¢ÇÒÕâÒ²ÊÇÎÒÃÇÒѾ­Ï°¹ßʹÓõÄÒ»ÖÖ¿ª·¢Ä£Ê½£¬.NET¡¢DHTMLµÈ¶¼ÌṩÁËÒ»Ì×ÍêÕûµÄʼþ´¦ÀíÄ£ÐÍ¡£ÏÂÃæÊǹØÓÚʹÓÃDHTMLÖÐʼþµÄÒ»¸ö×ܽᡣ
    DHTMLÌṩÁË3ÖÖʼþµÄÊ¹Ó ......

Javascriptѧϰ±Ê¼ÇÖ®×÷ÓÃÓò

ÔÚJavascriptÖÐ×÷ÓÃÓòÊÇÓɺ¯Êý»®·ÖµÄ¡£
//ÉèÖÃÈ«¾Ö±äÁ¿foo
var foo = "test";
if(true){
var foo = "new foo";
}
//´ËʱfooΪ"new test"
alert(foo == "new foo");
function test(){
var foo = "old test";
}
//µ÷ÓÃʱ£¬fooÖ»ÔÚº¯Êý×÷ÓÃÓòÄÚÆð×÷ÓÃ
test();
//foo»¹ÊǵÈÓÚ"new test"
alert(foo == "new te ......

ASP.NETºǫ́´úÂëµ÷ÓÃǰ̨javascript½Å±¾µÄ·½·¨

ºÜ¶àÈ˶¼ÏòÔÚ·þÎñÆ÷¶Ëµ÷Óÿͻ§¶ËµÄº¯ÊýÀ´²Ù×÷£¬Ò²¾ÍÊÇÔÚaspÖе÷ÓÃjavascript½Å±¾ÖÐÒѾ­¶¨ÒåºÃµÄ½Å±¾º¯Êý¡£¾­¹ýÑо¿£¬·¢ÏÖÁËһЩÃãÇ¿µÄ·½·¨¡£
1. ÓÃResponse.Write·½·¨Ð´Èë½Å±¾
±ÈÈçÔÚÄãµ¥»÷°´Å¥ºó£¬ÏȲÙ×÷Êý¾Ý¿â£¬ÍêÁ˺óÏÔʾÒѾ­Íê³É£¬¿ÉÒÔÔÚ×îºóÏëµ÷Óõĵط½Ð´ÉÏ
Response.Write("<script type='text/javascrip ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ