Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function () {
- $("#submit2").on("click", function() {
- $("#checkbox").attr("checked", true);
- // HERE YOU CAN DO SOME OTHER CODE TO SUBMIT FORM
- });
- });
- <input name="submit" type="submit" id="JustSubmit"/>
- <input name="submit" type="submit" onclick="checkedCheckbox()" id="SubmitWithCheckbox"/>
- function checkedCheckbox()
- {
- $('#myCheckbox').prop('checked', true);
- }
- <input name="submit" type="submit" id="submit" value="Save" />
- <input name="submit" type="submit" id="process" value="Process" />
- public ActionResult Index(Class Model, string submit)
- {
- if(submit == "process")
- {
- Model.Checked = true;
- }
- //if not...
- return View();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement