javascript¹ØÓÚgetElementById
ÐÂ×°ÁËϵͳ£¬Ð´Á˸ö²âÊÔÒ³£º
<html>
<head>
<title>test</title>
<script type="text/javascript">
function do(){
var message=document.getElementById('msg').value;
document.getElementById('div1').innerText=message;
}
</script>
</head>
<body>
<form action="" method="post">
<input type="text" name="msg" id="msg" />
<input type="button" name="btn" id="btn" value="Done" onclick="do()" />
</form>
<div name="div1" id="div1">
</div>
</body>
</html>
Ò³Ãæ¼ÓÔغó״̬À¸ÏÔʾҳÃæÓдíÎ󣬰´Å¥Ò²Ã»×÷Óá£getElementByIdÒ²²»Æð×÷Óá£ÒÔÇ°¾ÍÓöµ½¹ýÕâ¸öÎÊÌ⣬µ±Ê±°²Á˸öµ÷ÊÔjsµÄÈí¼þ·¢ÏÖgetElementByIdÕý³£ÁË£¬Ò²¾Íû¹ÜÁË¡£´ó¼Ò¶¼ÖªµÀÒªajaxÖУ¬getElementByIdÊDZز»¿ÉÉٵġ£¿ÉÏÖÔÚËüÈ´°ÕÁ˹¤¡£´ó¼Ò˵˵getElementByIdÊDz»ÊÇ»¹Òª×¨ÃÅÏÂÒ»¸öʲô¶«Î÷²ÅÄÜʹÓá£
ÓÐÒ»¸öÒÉÎÊ£ºÈç¹ûÊÇÒªÏÂÒ»¸öÖ§³ÖÎļþµÄ»°£¬ÎªÊ²Ã´Í¬Ò»Ì¨»ú×Ó·ÃÎʱðµÄÍøÒ³£¨getEl...£©¾ÍÐУ¬ÎҵľͲ»ÐУ»Èç¹û²»ÓÃÏ£¬ÄÇôÎÒµÄÓÖÊÇÄÄÀï³öÎÊÌâÁË£¬Çë´ó¼Ò½â»ó¡£
PHP code:
<html>
<head>
<title>test</title>
<script type="text/javascript">
function test(){//ÃüÃû²»ÒªºÍ¹Ø¼ü
Ïà¹ØÎÊ´ð£º
ÎÒÏëÎÊÒ»ÏÂÈçºÎÓÃjavascript¶¯Ì¬ÊµÏÖÏñÎÒÃÇÕâ¸öÍøÕ¾×ó±ßµÄĿ¼£¬Ð»À²£¡
??
ºÇºÇ£¡Ð»Ð»°¡£¡
¶¥Ò»ÏÂ
ÄãÃÇÊÇʲôÍøÕ¾°¡£¬ÒªÊǺǫ́ÊÇjavaÖ±½Ójsp£¬Èç¹ûºǫ́ÊÇc£¬ÄǾÍÓÃcgiÉú³Éxml£¬js¶¯Ì¬È¥¶ÁxmlµÄÊý¾Ý
Ó ......
²úÆ·µÄÅäÖÃÒ³Ãæ¹²ÓÃÒ»¸öÓÃJavaScriptµÄdTreeʵÏÖµÄÊ÷Ðνṹ£¬ÏÔʾµÄʱºò£¬Ê÷Ðνṹ¿¿ÔÚÒ³ÃæµÄ×î×ó±ß£¬¸úÎÒµÄÅäÖÃÒ³ÃæÖмä¸ôÁËÒ»´ó¿é£¬ÏÖÔÚÏë°ÑÊ÷ÐÎĿ¼¾ÓÖУ¬½ô¿¿ÔÚÅäÖÃÄÚÈÝÅԱߣ¬ÈçºÎ¿ØÖÆÊ÷ÐÎĿ¼µÄλÖã¬ÒÔ¼°¿É²»¿ ......
void CWEHelperDlg::OnOK(){
CString code;
//µ÷ÓÃVBSCRIPT£¬Äܵ¯³öÏûÏ¢¿ò,Ò²ÄÜÕýÈ··µ»Ø hello
code = "function main()\r\n\tMsgBox \"ok\"\r\n\tmain=\"hello\"\r\nend functio ......
ÎÒµÄÒ³ÃæÉÏÓÐÕâÑùÒ»¸öÔªËØ
JScript code:
<div>
²úÆ·Àà±ð£º<input type="text" name="productType" /><br />
²úƷͼƬ£º<input type="text" nam ......
RT ÈçºÎʹÓÃJavaScript°ÑÒ»·Ýxml¸ñʽµÄÎļþÖеÄdata¶Áȡת»»³ÉJSON Êý×é¸ñʽ£¬ÅªºÃµÄÔÚ¼Ó·ÖÊý
XML code:
- <channel>
<title>Key Events from Joe Santoro</title>
- <item>
< ......