Saturday 15 June 2013

javascript - How to checkbox record? -


Then I track the checkbox on page 1: Click

  var Checked = []; $ ('Input [type = checkbox]'). ("Click", function () {if ($ (this) .is (": checked")) {checked.push ($ (this) .val ());}}   

Finally, users can click on the Submit button, which takes them to page 2.html. So if I had a checkbox and "Apple", "Bannana" next page will know that Apple and Banana are checked However, when the user clicks the back button ...

The app is on the page that "Apple" and "banana" are checked ... but when the user is "Peach" H It looks like ... the only detected "peach" and "apple" and "banana" are not in the array. Is there any syntax that I use to keep track of "apple" and "banana" Can I do when the user hits the back button and checks for "peach", then "apple" can be "banana" and "peach" in the array "peach"?

is not a big fan of browsers with the behavior you mentioned, but come Page might want to consider checking each box's position on the Czech load, eg.

   

Note that this code means that the value can only be added to check . If the relevant checkbox is unchecked, you need to add a logic to delete prices.

No comments:

Post a Comment