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

selectÔªËØjavascript³£ÓòÙ×÷

 *˵Ã÷£ºselectÔªËØjavascript³£ÓòÙ×÷
* 1.ÅжÏÊÇ·ñ´æÔÚÖ¸¶¨valueµÄItem
* 2.¼ÓÈëÒ»¸öItem
* 3.ɾ³ýֵΪvalueµÄËùÓÐItem
* 4.ɾ³ýijһ¸öindexµÄÑ¡Ïî
* 5.¸üеÚindexÏîµÄvalueºÍtext
* 6.ÉèÖÃselectÖÐÖ¸¶¨textµÄµÚÒ»¸öItemΪѡÖÐ
* 7.ÉèÖÃselectÖÐÖ¸¶¨valueµÄµÚÒ»¸öItemΪѡÖÐ
* 8.µÃµ½µ±Ç°Ñ¡ÖÐÏîµÄvalue
* 9.µÃµ½µ±Ç°Ñ¡ÖÐÏîµÄindex
* 10.µÃµ½µ±Ç°Ñ¡ÖÐÏîµÄtext
* 11.Çå¿ÕËùÓÐÑ¡Ïî
-------------------------------------------------------*/
//1.ÅжÏÊÇ·ñ´æÔÚÖ¸¶¨valueµÄItem
function ExistValue(obj,value){
for(var i=0;i<obj.options.length;i++){
if(obj.options[i].value == value){
return true;
}
}
return false;
}
//2.¼ÓÈëÒ»¸öItem
function AddItem(obj,text,value){
var varItem = new Option(text,value);
obj.options.add(varItem);
}
//3.ɾ³ýֵΪvalueµÄËùÓÐItem
function RemoveItems(obj,value){
for(var i=0;i<obj.options.length;i++){
if(obj.options[i].value == ItemValue){
obj.options.remove(i);
}
}
}
//4.ɾ³ýijһ¸öindexµÄÑ¡Ïî
function RemoveItem(obj,index){
obj.options.remove(index);
}
//5.¸üеÚindexÏîµÄvalueºÍtext
function UpdateItem(obj,index,value,text){
obj.options[index].value = value;
obj.options[index].text = text;
}

//6.ÉèÖÃselectÖÐÖ¸¶¨textµÄµÚÒ»¸öItemΪѡÖÐ
function SelectItemByText(obj,text){
var isExit = false;
for(var i=0;i<obj.options.length;i++){
if(obj.options[i].text == text){
obj.options[i].selected = true;
return true;
}
}
return false;

}
//7.ÉèÖÃselectÖÐÖ¸¶¨valueµÄµÚÒ»¸öItemΪѡÖÐ
function SelectItemByValue(obj,value){
var isExit = false;
for(var i=0;i<obj.options.length;i++){
if(obj.options[i].value == value){
obj.options[i].selected = true;
return true;
}
}
return false;

}
//8.µÃµ½µ±Ç°Ñ¡ÖÐÏîµÄvalue£¬index,text
function GetValue(obj){
return obj.value;
}
//9.µÃµ½µ±Ç°Ñ¡ÖÐÏîµÄindex
function GetInd


Ïà¹ØÎĵµ£º

Javascriptµ÷ÓÃWebService

WebServiceÎļþ£º
  [WebMethod]
public int DoMulti(int num1,int num2)
{
int result;
result = num1 * num2;
return result;
}
ASPXÎļþ£º
<%@ Page language="c#" Codebehind="Javascript.aspx.cs" AutoEventWireup="false" Inherits=" ......

Ò»¸ö´øCheckBoxµÄÊ÷ÐÎĿ¼µÄµÝ¹éËã·¨£¨javascript£©


°¦£¬ºÜ¾ÃÒÔǰдµÄ´úÂ룬ɹһɹ£¬¹À¼Æ×Ô¼º¿´¶¼¿´²»¶®ÁË£¬:(
var head="display:''"
img_close=new Image()
img_close.src="/sysManage/images/f.gif"
img_open=new Image()
img_open.src="/sysManage/images/fo.gif"
img3=new Image()
img3.src="/sysManage/images/e.gif" ......

Ò»¶ÎʵÏÖHTMLÒ³ÃæÄÚ¶¨ÆÚ´¥·¢Ê¼þµÄJavaScript´úÂë

avaScriptͨ¹ýÄÚÖõÄsetTimeoutº¯ÊýÀ´Íê³ÉÒ³ÃæÄڵĶ¨Ê±¼ì²é£¬Ò²ÊǺܾÃÒÔǰдµÄ¶«Î÷ÁË¡£
Ö®ËùÒÔÏëÆðËüÀ´£¬ÊÇÒòΪÔÚºÍÏîÄ¿×éÆäËû³ÉԱ˵¸ÃÊÂÇéµÄʱºò£¬±ðÈ˾¹È»³°Ð¦ÎÒ˵ÊÇÉϸöÊÀ¼ÍµÄ´úÂ룬ÏÖÔÚ¶¼ÓÃWEB2.0ÁË¡£
<script language="JavaScript" type="text/JavaScript">
//Ôö¼ÓϵͳɨÃèʱ¼ä
var v_ ......

10ÖÖJavaScriptÌØЧʵÀýÈÃÄãµÄÍøÕ¾¸üÎüÒýÈË

    ½ñÌìµÄ»°ÌâÊÇÈçºÎ¸Ä½ø×Ô¼ºÍøÕ¾µÄ½çÃæ»òÌá¸ßÍøÕ¾µÄÊÓ¾õÌåÑ飬´Ó¶øÈÃÓû§¼ÇÒäÓÌС£
    ÎÒÃÇÓÐÈýÖÖÖ÷ÒªµÄ·½·¨(´ÓÄѵ½Ò×):×Ô¼º¶¯ÊÖд½Å±¾;ʹÓÃÀàËÆÓÚjQueryºÍmooToolsµÄJavaScript¿ò¼Ü(¿ÉÒÔÈñàд´úÂë±äµÃ¸üÈÝÒ×Щ);ʹÓÃÄܹ¤×÷ÓÚÏÖÓеÄJavaScript¿ò¼ÜϵÄÌáÇ°Ô¤ÖúõĽű¾»òÄÇÖÖ´ÓÍ·¿ªÊ¼¿ ......

JavaScript mediaplayer


Js´úÂë
<object classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="wmp" >   
<param name="URL" value="" />                       ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ