Check box value. how can this problem be solved?

Source: Internet
Author: User
The three values of the check box values are read from the database. if they are not empty, the code will be OK: & lt; tr & gt; & lt; td & nbsp; class = "add_table_left" & gt; application type: & lt;/td & gt; & lt; td & nbsp; class = "check box value

The three values are read from the database. if they are not empty, OK.
Code:

Application Type:

$ Arr_app_type = explode (";", $ rs ["app_types"]);
$ SQL = "select * from app_type where id in (10, 4, 6) order by id ";
$ Mysql-> query ($ SQL );
While ($ row = $ mysql-> fetch_array ()){
?>
"
/>
 

}
?>


------ Solution --------------------
I don't know what you want to ask
------ Solution --------------------
In the form onsubmit event, call js function verification.
------ Solution --------------------
Refer
《script》
function foo(){
    var chs=document.getElementsByName('app_types[]');
var counter=0;
for(var i=0;i      if(chs[i].checked) counter++;
}
if(counter==0) return false;
return true;
}
《script》

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.