我嘗試使用jquery更改div框中的文本插入。這裏是代碼:
<div onClick="$(this span).text('My new Text');" class="switch switch-success" style="float: right;">
<label>
<input type="checkbox"><span>Yes</span>
</label>
</div>
我想改變這個 「是」, 「否」。感謝您的幫助;)
[jQuery的學習中心(https://learn.jquery.com) – Andreas
請試一下。這是基本的DOM遍歷。 – Xufox
這必須是重複的問題... – evolutionxbox