JavaScript怎么實現(xiàn)重置功能

這篇文章主要介紹“JavaScript怎么實現(xiàn)重置功能”,在日常操作中,相信很多人在JavaScript怎么實現(xiàn)重置功能問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”JavaScript怎么實現(xiàn)重置功能”的疑惑有所幫助!接下來,請跟著小編一起來學(xué)習(xí)吧!

專業(yè)成都網(wǎng)站建設(shè)公司,做排名好的好網(wǎng)站,排在同行前面,為您帶來客戶和效益!創(chuàng)新互聯(lián)為您提供成都網(wǎng)站建設(shè),五站合一網(wǎng)站設(shè)計制作,服務(wù)好的網(wǎng)站設(shè)計公司,成都網(wǎng)站設(shè)計、網(wǎng)站建設(shè)負責(zé)任的成都網(wǎng)站制作公司!

JavaScript實現(xiàn)重置功能的方法:【$(document).on('click','.dealFlowSelectedBox_bntBox_left',function(){ $('.dealFlowSelectedBox_...】。

JavaScript怎么實現(xiàn)重置功能

本文操作環(huán)境:windows10系統(tǒng)、JavaScript 1.8.5、thinkpad t480電腦。

JavaScript實現(xiàn)重置功能的具體代碼如下所示:

HTML代碼:

<body>
<!--頭部-->
<div class="mui-content">
	<div class="headerBox">
		<a href="javascript:history.go(-1);" class="fanhuiBnt">
			<img src="../img/dealFlow/fanhui.png" />
		</a>
		篩選條件
	</div>
	<div class="dealFlowSelectedBox">
		<div class="dealFlowSelectedBox_title">
			<em></em>
			<span>支付方式</span>
		</div>
		<div class="dealFlowSelectedBox_contBox">
			<a href="javascript:void(0);" class="dealFlowSelectedBox_payment active"><img src="../img/dealFlow/quanbu.png" />全部</a>
			<a href="javascript:void(0);" class="dealFlowSelectedBox_payment "><img src="../img/signing/zhifubao.png" />支付寶收款</a>
			<a href="javascript:void(0);" class="dealFlowSelectedBox_payment "><img src="../img/signing/weixin.png" />微信收款</a>
		</div>
	</div>
	<div class="dealFlowSelectedBox_line"></div>
	<div class="dealFlowSelectedBox">
		<div class="dealFlowSelectedBox_title">
			<em></em>
			<span>證件資料</span>
		</div>
		<div class="dealFlowSelectedBox_contBox">
			<a href="javascript:void(0);" class="dealFlowSelectedBox_certificate active">全部</a>
			<a href="javascript:void(0);" class="dealFlowSelectedBox_certificate ">收款成功</a>
			<a href="javascript:void(0);" class="dealFlowSelectedBox_certificate ">退款成功</a>
			<a href="javascript:void(0);" class="dealFlowSelectedBox_certificate ">收款失敗</a>
		</div>
	</div>
	<div class="dealFlowSelectedBox_line"></div>
	<div class="dealFlowSelectedBox" style="padding: 0;">
		<div class="dealFlowSelectedBox_title" style="margin: 0 0.24rem;width: calc(100% - 0.24rem);">
			<em></em>
			<span>交易時間</span>
		</div>
		<ul class="dealFlowSelectedBox_timeBox">
			<li>
				<span>開始時間</span>
				<input type="text" id="starDate" name="starDate" value="" placeholder="請選擇開始日期" readonly="readonly" />
				<img src="../img/index/index_xyjt.png" />
			</li>
			<li>
				<span>結(jié)束時間</span>
				<input type="text" id="endDate" name="endDate" value="" placeholder="請選擇結(jié)束日期" readonly="readonly" />
				<img src="../img/index/index_xyjt.png" />
			</li>
		</ul>
	</div>
	<div class="dealFlowSelectedBox_bntBox">
		<a href="javascript:void(0);" class="dealFlowSelectedBox_bntBox_left">重置</a>
		<a href="javascript:void(0);" class="dealFlowSelectedBox_bntBox_right">確定</a>
	</div>
</div>
 
</body>

JS代碼:

<script type="text/javascript">
$(document).on('click','.dealFlowSelectedBox_bntBox_left',function(){
	$('.dealFlowSelectedBox_payment').removeClass('active');
	$('.dealFlowSelectedBox_certificate').removeClass('active');
	$('.dealFlowSelectedBox_payment').first().addClass('active');
	$('.dealFlowSelectedBox_certificate').first().addClass('active');
	$("input").val('');
})
</script>

到此,關(guān)于“JavaScript怎么實現(xiàn)重置功能”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識,請繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會繼續(xù)努力為大家?guī)砀鄬嵱玫奈恼拢?/p>

分享名稱:JavaScript怎么實現(xiàn)重置功能
地址分享:http://muchs.cn/article2/ijdeic.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站制作、網(wǎng)站營銷、用戶體驗、云服務(wù)器、軟件開發(fā)、網(wǎng)站設(shè)計

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

營銷型網(wǎng)站建設(shè)