jQuery unbind()方法實(shí)例詳解
620
2024-03-13
先給大家展示效果圖,如果大家覺得還不錯(cuò),請繼續(xù)參考實(shí)現(xiàn)代碼。
廢話不多說了,直接給大家貼代碼了。
代碼如下:
<!DOCTYPE html> <html> <head> <title>jquery刪除添加輸入文本框</title><base target="_blank" /> <meta charset="utf-8"> <link rel="stylesheet" type="text/css" /> <style>.hovertreeinfo{clear:both;text-align:center;}.hovertreeinfo a{color:blue}.hovertreebd{display:inline-block;width:336px;height:280px;}</style> </head> <body> <div class="site"> <div class="title">標(biāo)簽:</div> <div class="tip"> <div class="tip-container"><span class="jia"></span>添加標(biāo)簽</div> </div> </div> <div class="hovertreeinfo"> <input type="button" value="獲取全部值" id="hovertreeall" /> <br /> <span id="hovertreeresult"></span> <br /> <a >原文</a> <a >首頁</a> <a >特效</a> </div> <script type="text/javascript" src="http://down.hovertree.com/jquery/jquery-1.12.3.min.js"></script> <script type="text/javascript" src="http://hovertree.com/texiao/jquery/67/js/tip.js"></script> <script> $("#hovertreeall").on("click", function () { $("#hovertreeresult").html("<br />"); $(":input.house-tip").each( function () { // alert($(this).val()); $("#hovertreeresult").append($(this).val()+"<br />"); } ) }) </script> </body> </html>
以上所述是小編給大家介紹的jQuery添加和刪除輸入文本框標(biāo)簽代碼的相關(guān)知識,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時(shí)回復(fù)大家的。在此也非常感謝大家對綠夏網(wǎng)網(wǎng)站的支持!
#免責(zé)聲明#
本站[綠夏技術(shù)導(dǎo)航]提供的一切軟件、教程和內(nèi)容信息僅限用于學(xué)習(xí)和研究目的;不得將上述內(nèi)容用于商業(yè)或者非法用途,否則,一切后果請用戶自負(fù)。本站信息來自網(wǎng)絡(luò)收集整理,版權(quán)爭議與本站無關(guān)。您必須在下載后的24個(gè)小時(shí)之內(nèi),從您的電腦或手機(jī)中徹底刪除上述內(nèi)容。如果您喜歡該程序或內(nèi)容,請支持正版,購買注冊,得到更好的正版服務(wù)。我們非常重視版權(quán)問題,如有侵權(quán)請郵件[admin@lxwl520.com]與我們聯(lián)系進(jìn)行刪除處理。敬請諒解!