I have a number of checkboxes on an HTML page, and I would like to check the checkboxes based on the corresponding HTML query string parameters.
eg.
...path/page.html?i=1&j=1&x=0
will cause the page with three checkboxes to check 1 and 2 at loading.
Can someone show me how to do this or point me towards a suitable tutorial?
Many thanks,
EDIT: Clarification, i, j and x are just taken off my head, but they are logical variables (1 = true, 0 = false), and each of them corresponds to a checkbox, therefore:
i = one checkbox, the value in the example is 1, so the checkbox should be checked.
j = as above
x = one checkbox, the value in the example is 0, so the checkbox should not be checked.
source
share