این کد را استفاده کنید:
کد:<!DOCTYPE html> <html> <head> <title>TODO supply a title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="http://code.jquery.com/jquery-1.12.0.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#thischeck').click(function(){ if($(this).prop("checked") == true){ confirm("Press a button!");; } else if($(this).prop("checked") == false){ confirm("Press a button!");; } }); }); </script> </head> <body> <dt><input id="thischeck" type="checkbox" id="status" name="status" value="1" />فروش</dt> </body> </html>
در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)