jqueryを検索しましたが、私の質問に関係しない多くの回答がありましたが、ラベルを変更しました。リンクを含むラベルにラベルを変更したい。私はそれを働かせるように見えない!私はJSをコードの頭の位置に置いたが、運がなかったし、JSFiddleを使用しても、以下を参照してください。私は間違って何をしていますか?JQuery経由でフォームラベルのラベルを変更
JSFiddle https://jsfiddle.net/14tx86j5/
HTML
<input name="input_147.1" value="I agree to Veryappt’s Terms of Service" id="choice_3_147_1" type="checkbox">
<label for="choice_3_147_1" id="label_3_147_1">I agree to Companies Terms of Service</label>
のjQuery
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($) {
$("#label_3_147_1 label").html('You also agree to our <a href="http://www.google.com/accounts/TOS" name="terms" target="_blank">Privacy Policy</a>, which describes how we process your information. <a href="https://support.google.com/accounts/answer/1733224?hl=en-GB" name="terms" target="_blank">Learn More</a> about why we ask for this information.');
});
</script>
jquery liberaryを含める必要がありますhttps://code.jquery.com/jquery-1.12.3.min.js –
同じIDを持つ2つの要素は、常にこれらのエラーを表示します –
今投稿されている回答は別としてなぜあなたはこのことをやるのだろう? htmlを変更できませんか? :P – twicejr