javascript Öпؼþ±³¾°É«µÄÉèÖÃ
function Search(){
//Èç¹ûǰһ¸ö¿Ø¼þµÄÖµ´óÓÚºóÒ»¸ö¿Ø¼þµÄÖµ(ǰÌáÊǺóÒ»¸ö¿Ø¼þ²»ÊÇ¿Õ,¿ÕµÄÇé¿öϲ»×öÈκδ¦Àí)
if(document.forms[0].koteifrom.value > document.forms[0].koteiTo.value && document.forms[0].koteiTo.value != ""){
alert('messageÄÚÈÝ');
var koteifrom = document.getElementById("koteifrom");//¿Ø¼þµÄÈ¡µÃ
var koteiTo = document.getElementById("koteiTo");//¿Ø¼þµÄÈ¡µÃ
koteifrom.style.backgroundColor = "#ffcccc";//¿Ø¼þµÄ±³¾°É«±äÎª×ØºìÉ«,´¦Àí½áÊø
koteiTo.style.backgroundColor = "#ffcccc";
return;
}
document.forms[0].action="./xxxxxxxxAction.do";
document.forms[0].submit();
}
ÔÚhtmlÖÐÓÐÒÔÏÂÁ½¸ö¿Ø¼þ:
<td width="530px">
<html:select name="xxxxxxForm" property="koteifrom" style="width:250px;" >
<html:optionsCollection name="SCOM" property="key(xxxxx).subKey(KoteiComboList)" />
</html:select> ¡« <html:select name="xxxxxxForm" property="koteiTo" style="width:250px;" >
<html:optionsCollection name="SCOM" property="key(xxxxx).subKey(KoteiComboList)" />
</html:select>
</td>
Ïà¹ØÎĵµ£º
ÓÐʱºò½øÐÐajax½»»¥µÄʱºò£¬·µ»ØµÄÊý¾Ý¿ÉÒÔ×Ô¼ºÌí¼Ó·Ö¸ô·û£¬±ÈÈç^^^£¬È»ºó¶ÔÕâЩ·Ö¸ô·û½øÐнâÎö£¬·Ö½âΪһ¸öÊý×é¡£
function fill(v) {
if (v == undefined)return false;
var result = v.split("^^^");
$("#cnPatent").val(result[0]);
$("#cnPText").val(result[1]); ......
Ò»¡¢deleteÔËËã·ûɾ³ý¶ÔÒÔǰ¶¨ÒåµÄ¶ÔÏóÊôÐÔ»ò·½·¨µÄÒýÓãº
var o=new Object();
o.name="hello";
alert(o.name); //Êä³ö“hello”
delete o.name£»
alert(o.name); //Êä³ö& ......
ÄÚÖÃÀà
JavaScriptÊÇÒ»ÖÖ»ùÓÚ¶ÔÏóµÄ½âÊÍÐÔ±à³ÌÓïÑÔ£¬ËùÓеÄÔªËØ£¬ÎÒÃǶ¼¿ÉÒÔÀí½âΪ¶ÔÏó£¬Ã¿¸ö¶ÔÏóÒ²¿ÉÒÔÀí½âΪN¶àÊôÐԵļ¯ºÏ¡£ÔÚÌÖÂÛ×Ô¶¨ÒåÀà֮ǰ£¬ÎÒÃÇÏÈ¿´Ò»ÏÂÄÚÖõÄÀà¡£×÷Ϊ½âÊÍÐÔÓïÑÔ£¬JavaScriptÔÊÐíÎÒÃÇÔÚÈκÎʱºòΪ¶ÔÏóÌí¼ÓÊôÐÔ¡£ËùÒÔÎÒÃÇ¿ÉÒÔÏÈ¿´Ò»¶Î¼òµ¥µÄ´´½¨¶ÔÏóµÄ´úÂëÆ¬¶Î¡£ÕâÀïµÄ“new Object”Ò²¿ ......
ͨ¹ýxmlhttp+webservice(Ôʼ·½·¨)
ÔÎĵØÖ·:http://netboy.cnblogs.com/archive/2006/02/18/333260.html
view plaincopy to clipboardprint?
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
  ......
¢Ùfunction doDelete(){
var deleteArray = new Array();
var cnt = 0;
for (i = 0; i < document.forms[0].elements.length; i++ ) {
// ¥Á¥§¥Ã¥¯¥Ü¥Ã¥¯¥¹¤¬ON¤Î時¤Ï¤½¤Î値¤ò設¶¨¤¹¤ë¡£
......