jQuery Change Input text upon selection of radio button

前端 未结 5 549
借酒劲吻你
借酒劲吻你 2021-01-28 04:26

Trying to get the value=\"\" of to change upon selection of a radio button. So if the user

5条回答
  •  既然无缘
    2021-01-28 05:00

    $(document).ready(function() {
        $("input[name=option1]:radio").click(function(eventObj) {
            $("input[name=searchQuery]").val("Enter a " + $(eventObj.target).val());
        });
    });
    

提交回复
热议问题