$("input[type=checkbox][checked]").each(function(){ //Since the checkbox is generally selected Multiple, so you can loop and output alert($(this).val()); });
$("#A").val("1" ) The value of id A is 1. This is the case in jQuery. When assigning, it is passed to the function as a parameter, which is different from simple js. Like $("#A").html("1")$( "#A").text("1") is all about assignment $("#A").html() $("#A").text() is all about taking value, taking html, taking text Text Method 1:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn