auto checkbox based from url value using javascript/jQuery

前端 未结 2 797
走了就别回头了
走了就别回头了 2021-01-22 11:52

Is there way to or it is possible to do it using javascript/jQuery?

Based Link URL: first one will check Type A and Type B and second example will check Type D



        
2条回答
  •  伪装坚强ぢ
    2021-01-22 12:12

    This question shows a solution to check the query string parameters using javascript. There is also a link at the top to a possible duplicate question that provides a solution using JQuery.

    Once you determine the querty string parameters, you can use jQuery to check the box (as detailed in another question):

    $('input[value="A"]').prop("checked", true);
    

提交回复
热议问题