久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      jquery表單怎么實(shí)現(xiàn)點(diǎn)擊增加一行

      表單點(diǎn)擊增加一行的實(shí)現(xiàn)方法:1、使用click()函數(shù)給form元素綁定點(diǎn)擊事件,并設(shè)置事件處理函數(shù);2、在事件處理函數(shù)中,使用append()函數(shù)向表單中增加一行控件,語(yǔ)法為“$(this).append("表單輸入控件元素");”。

      jquery表單怎么實(shí)現(xiàn)點(diǎn)擊增加一行

      本教程操作環(huán)境:windows7系統(tǒng)、jquery1.10.2版本、Dell G3電腦。

      jquery表單實(shí)現(xiàn)點(diǎn)擊增加一行

      實(shí)現(xiàn)方法:

      • 使用click()函數(shù)給form元素綁定點(diǎn)擊事件,并設(shè)置事件處理函數(shù)

      • 在事件處理函數(shù)中,使用append()函數(shù)向表單中增加一行

      實(shí)現(xiàn)代碼:

      <!DOCTYPE html> <html> 	<head> 		<meta charset="utf-8" /> 		<script src="js/jquery-1.10.2.min.js"></script> 		<script type="text/javascript"> 			$(document).ready(function() { 				$("form").click(function() { 					$(this).append("<br>其 他: <input>"); 				}); 			}); 		</script> 	</head> 	<body> 		<form style="border: 1px solid red;padding: 10px;"> 		用戶名: <input type="text" name="name"><br> 		密 碼: <input type='password' name='password'> 		</form> 		<p>點(diǎn)擊表單,增加一行數(shù)據(jù)</p> 	</body> </html>

      jquery表單怎么實(shí)現(xiàn)點(diǎn)擊增加一行

      說(shuō)明:

      append( ) 方法可以向所選元素內(nèi)部的“末尾處”插入內(nèi)容。

      語(yǔ)法:

      $(A).append(B)

      表示往 A 內(nèi)部的末尾處插入 B。

      【推薦學(xué)習(xí):jQuery視頻教程、web前端視頻】

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)