ÇóÒ»javascript?
³ÌÐòÖÐÓÃ4¸ö <input type ="text"name="name1">
ÔõôʵÏÖ¼àÌýµÚÈý¸ötext¿ò,¼ÙÈçÓÐÖµÎÒ¾ÍתÏòquery2.jsp(Ìõ¼þÖ»ÓÐtext3Ò»¸ö¿òÓÐÖµ²ÅתÏòquery2.jsp)
¼ÙÈçµÚ3¸ötext¿òÓÐÖµ£¬ÔÚ¼ÓÉÏÆäËûÒ»¸ötext¿òÖµÄÇô¾ÍÌá½»¾ÍÕæ½ÓÌá½»µ½ÎÒµÄform µÄAction
<input type ="text"name="name1" id="1">
<input type ="text"name="name1" id="2">
<input type ="text"name="name1" id="3">
<input type ="text"name="name1" id="4">
window.onload = function(){
var input3 = document.getElementById('3');
if(input3.value != ""){
//È»ºóÄã¾ÍÌá½»~··
}
};
Ê×ÏÈÄãÒª±£Ö¤ÓÐ3¸ötext,ÿ¸öname¶¼ÊÇ"name1",Ìõ¼þÊDz»ÊÇÖ»ÓеÚÈý¸ötextÓÐÖµ£¬ÆäËû¶¼Îª¿Õ£¿
var txts=document.getElementsByName("name1");
if(txts.length>1){
if(txts[2].value!=""&&txts[0].value==""&&txts[1].value==""){
//Ò³ÃæתÏò´úÂë
}
}
Îı¾¿òÓÐĬÈÏÖµÂð£¿
ûÓУ¡
JScript code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
Ïà¹ØÎÊ´ð£º
javascript¶¯Ì¬ÍøÒ³¿ª·¢Ïê½â ÕâÊéÔõôÑù
Ï´ÎÏ£ÍûÄãÄÜ°ÑÏëÎʵÄÎÊÌâ½²Çå³þ£¬²»È»ºÜÄÑÓÐÈ˻شðÄãµÄÎÊÌâ¡£
ÄãÕâÑùÎÊ»ù±¾Éϲ»Á˽âÄãÏëÒªÖªµÀЩʲô¡£
£º£©
ÊÇÕâÑùµÄ£¡
Ò»£¡£¡ÎÒ·¢ÏÖÂ¥ÉϺÍÎÒ³¤Ïà²î²»¶ ......
ÎÒҪʵÏÖµÄͼÏñƽÒÆÒªÏëµç×ÓµØͼÖÐÄÇÑù£¬ÔÚÒ»¸ö¹Ì¶¨µÄÇøÓòÄÚ½øÐÐËõ·ÅºÍƽÒÆ£¬³¬³öÕâ¸öÇøÓòÄڵIJ¿·ÖÓ¦¸Ã¿´²»µ½ÁË
Õâ¸öÒ»ÏÂ˵²»Çå³þ£¬ÄãËÑË÷ÏÂÕâÀàµÄJSЧ¹ûÎļþ£¬Ó¦¸ÃÓеÄ
asdads
²»ÖªµÀJQUERYÓÐûÓÐÕâÖÖ²å¼þ
......
<script language="javascript">
var clkCount = 0;
function inputTestClick()
{
var ......
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>ÎÞ±êÌâÎĵµ </title>
<style type=" ......
javascriptÖÐ2¼¶Ê¼þÖÐDOM°ÑËü·ÖÎļþÊ÷£¬ÄǸöÎļþÊ÷µÄ½á¹¹ÊÇÔõôÑùµÄ£¿2¼¶´«²¥Öи¸½ÚµãºÍ×Ó½ÚµãµÄ¹Øϵ£¬ÄܾٸöÀý×Ó˵Ã÷Ò»ÏÂÂð£¿ÊéÉÏдµÃºÜÂÒ£¬Àý×ÓҲû¾Ù¡£Ð»Ð»ÁË£¡
µÍÊÖÆ®¹ý¡£
˵ÆðÀ´ÊÇͦ¸´Ôӵģ¬² ......