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

ʹÓÃjavascript»ñÈ¡Îı¾¿ò,ÏÂÀ­¿ò,µ¥Ñ¡¿òµÄÖµ²¢ÇÒ¸³Öµ

1.Îı¾¿ò
1.1 <input type="text" name="test" id="test">
ͨ¹ývar t=document.getElementById("test").value°ÑÖµ¸³¸ø±äÁ¿t,
1.2  µ±È»Ò²¿ÉÒÔ·´¹ýÀ´°ÑÒÑÖªµÄ±äÁ¿Öµ¸³¸øÎı¾¿ò£¬ÀýÈ磺
var m = "5";
document.getElementById("test").value= m;
2.ÏÂÀ­Áбí¿ò
2.1 <select name="sel" id="sel" onchange="look();">
<option value="1" >11</option>
<option value="2" selected>22</option>
<option value="3">33</option>
</select>
ͨ¹ývar s=document.getElementById("sel").value»ñÈ¡<select>¿òÖÐÑ¡ÖеÄÖµ£¬´Ë´¦Ä¬ÈÏÑ¡ÖÐvalue="2"µÄÑ¡ÏËùÒÔ¸³¸ø±äÁ¿s µÄÖµÊÇ"2",¶ø²»ÊÇ"22",
¼ÙÈçÒª°Ñ<select>ÖÐÑ¡ÔñµÄ"Öµ"Èç"3"¶ÔÓ¦µÄ"Îı¾Öµ"("33")¸³¸øtestÎı¾¿ò£¬¿ÉÒÔͨ¹ýÈçÏ·½·¨£¬
 <script language="javascript">
function look(){
     var se =document.getElementById("sel");  
                 var option=se.getElementsByTagName("option");  
                 var str = "" ;  
                 for(var i=0;i<option.length;++i)  
                 {  
                 if(option[i].selected)  
                 {   
                 document.getElementById("test").value = option[i].text;   
                 }  
          &nb


Ïà¹ØÎĵµ£º

¹ØÓÚJavascript¹¹Ô캯Êý,Àà³õʼ»¯ÊµÀý

 var Class = {
¡¡create: function() {
¡¡¡¡return function() {
¡¡¡¡¡¡this.initialize.apply(this, arguments);
¡¡¡¡}
¡¡}
}
¡¡¡¡ÕâÊÇprototype.jsÀïÃæµÄÀ๹Ôì·½·¨£¬Ê¹Ó÷½·¨ÊÇ£º
¡¡¡¡var myClass = Class.create();
¡¡¡¡ÕâÑù¾Í¿ÉÒÔ´´½¨Ò»¸öÀàÁË¡£
¡¡¡¡¼ÌÐø¼ÓÈ룺
myClass.prototype =
{
¡¡x : func ......

VRMLÓëJavascriptºÍVBscript½»»¥µÄʵÀý

 ÏÖ½«´úÂëÌù³ö£¬¹²Ã㣡
HTML²¿·Ö£º=====================================================
<html>
<head>
<script language="VBscript">
<!--
function M_b()
 set M_e=Scene.Engine
 M_e.Nodes("MyScript").Fields("nodestring")="Shape {geometry Box{}}"
 M_e.Nodes ......

javaScript Êý×é

 1¡¢Êý×éµÄ´´½¨
var arrayObj = new Array();¡¡//´´½¨Ò»¸öÊý×é
var arrayObj = new Array([size]);¡¡//´´½¨Ò»¸öÊý×é²¢Ö¸¶¨³¤¶È£¬×¢Òâ²»ÊÇÉÏÏÞ£¬Êdz¤¶È
var arrayObj = new Array([element0[, element1[, ...[, elementN]]]]);¡¡´´½¨Ò»¸öÊý×é²¢¸³Öµ
Ҫ˵Ã÷µÄÊÇ£¬ËäÈ»µÚ¶þÖÖ·½·¨´´½¨Êý×éÖ¸¶¨Á˳¤¶È£¬µ«Êµ¼ÊÉÏËùÓ ......

Javascript½âÒÉ

Javascript½âÒÉ
1.        HTML¿ò¼ÜframesetµÄÓ¦ÓÃ
¿ò¼Ü±à³Ì¸ÅÊöÒ»¸öHTMLÒ³Ãæ¿ÉÒÔÓÐÒ»¸ö»ò¶à¸ö×Ó¿ò¼Ü£¬ÕâЩ×Ó¿ò¼ÜÒÔ<iframe>À´±ê¼Ç£¬ÓÃÀ´ÏÔʾһ¸ö¶ÀÁ¢µÄHTMLÒ³Ãæ¡£ÕâÀïËù½²µÄ¿ò¼Ü±à³Ì°üÀ¨¿ò¼ÜµÄ×ÔÎÒ¿ØÖÆÒÔ¼°¿ò¼ÜÖ®¼äµÄ»¥Ïà·ÃÎÊ£¬ÀýÈç´ÓÒ»¸ö¿ò¼ÜÖÐÒýÓÃÁíÒ»¸ö¿ò¼ÜÖеÄJavaScript± ......

ÔÚC++ÖÐÓÃWebBrowser¿Ø¼þµ÷ÓÃJavaScriptº¯Êý

Ö÷Òªº¯Êý CallJScript
BOOL CallJScript(const wchar_t * func, VARIANT * vtParams, int cNumberOfParam, VARIANT * vtResult)
{
if(!func || !func[0])
return FALSE;
CComPtr<IDispatch> spScript;
spScript = GetJScript();
if(!spScript)
return FALSE;
DISPID dispID = NULL;
CC ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ