謝晒的PHP網頁設計
聯絡E-mail:
sean0704@gmail.com
站內搜尋
Wednesday, July 26, 2017
[jQuery] 如何讓程式執行點選並觸發click事件 (透過 trigger 來實現)
HTML的部分:
<input type="radio" name="test" value="1">1
<input type="radio" name="test" value="2">2
<input type="radio" name="test" value="3">3
JS的部分:
$("input[name='test'][value='1']").prop("checked", true).trigger("click");
No comments:
Post a Comment
Newer Post
Older Post
Home
View mobile version
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment