Home  >  Article  >  Web Front-end  >  jquery quick value example through name_jquery

jquery quick value example through name_jquery

WBOY
WBOYOriginal
2016-05-16 17:02:30992browse
Copy code The code is as follows:

function getValues_ByName() {
var order = [];
$("[name=chkbox_id]:checked").each(function () {
order.push($(this).val());
});
var values ​​= order.join(',');
if (values ​​== "") {
alert("Option cannot be empty!");
return;
} else {
alert (values);
}
}
Statement:
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