Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 ......

IEÓëFirefoxÔÚJavaScriptÉϵÄ7¸ö²»Í¬¾ä·¨

 
¾¡¹ÜÄÇÐèÒªÓó¤´®µÄ¡¢³ÁÃÆµÄ²»Í¬·ÖÖ§´úÂëÀ´Ó¦¸¶²»Í¬ä¯ÀÀÆ÷µÄÈÕ×ÓÒѾ­¹ýÈ¥£¬Å¼¶û»¹ÊÇÓбØÒª×öһЩ¼òµ¥µÄÇø·ÖºÍÄ¿±ê¼ì²âÀ´È·±£Ä³¿é´úÂëÄÜÔÚÓû§µÄ»úÆ÷ÉÏÕý³£ÔËÐС£ÔÚÕâÆªÎÄÕÂÖУ¬×÷Õß½éÉÜÁË7¸öÔÚIEºÍFirefoxÖв»Í¬µÄJavaScript¾ä·¨¡£
1. CSS "float" Öµ
·ÃÎÊÒ»¸ö¸ø¶¨CSS ÖµµÄ×î»ù±¾¾ä·¨ÊÇ£ºobject.styl ......

JavaScript±íµ¥ÑéÖ¤´óÈ«£¨¶þ£©

/*
ÓÃ;£º¼ì²éÊäÈë×Ö·û´®ÊÇ·ñÖ»ÓÉÓ¢ÎÄ×ÖĸºÍÊý×ÖºÍÏ»®Ïß×é³É
ÊäÈ룺
s£º×Ö·û´®
·µ»Ø£º
Èç¹ûͨ¹ýÑéÖ¤·µ»Øtrue,·ñÔò·µ»Øfalse
*/
function isNumberOr_Letter( s ){//ÅжÏÊÇ·ñÊÇÊý×Ö»ò×Öĸ
var regu = "^[0-9a-zA-Z\_]+$";
var re = new RegExp(regu);
if (re.test(s)) {
return true;
}else{
return false;
} ......

javaScript Êý×é

 1¡¢Êý×éµÄ´´½¨
var arrayObj = new Array();¡¡//´´½¨Ò»¸öÊý×é
var arrayObj = new Array([size]);¡¡//´´½¨Ò»¸öÊý×é²¢Ö¸¶¨³¤¶È£¬×¢Òâ²»ÊÇÉÏÏÞ£¬Êdz¤¶È
var arrayObj = new Array([element0[, element1[, ...[, elementN]]]]);¡¡´´½¨Ò»¸öÊý×é²¢¸³Öµ
Ҫ˵Ã÷µÄÊÇ£¬ËäÈ»µÚ¶þÖÖ·½·¨´´½¨Êý×éÖ¸¶¨Á˳¤¶È£¬µ«Êµ¼ÊÉÏËùÓ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ