Answers for "reset radio buttons after submit"

0

clear the input when change the radio button

$('input[name="am_payment"]').on('click', function() {
   if ($(this).val() === '') {
      $('#theamount').val('').prop("removed", true).focus();
   }
   else {
      $('#theamount').val('').prop("disabled", false);
   }
});
Posted by: Guest on November-05-2020
0

what is html injection on a sample form having textbox, radio button, reset button, submit button

<form>
    <table>
        <tr>
            <td>
                <label for="uname">Name</label>
            </td>
            <td>
                <input type="text" id="uname" name="username">
            </td>
        </tr>
        
        <tr>
            <td>
                <label for="age">Age</label>
            </td>
            <td>
                <input type="text" name="userage" id="age" size="2" maxlength="2">
            </td>
        </tr>
        
        <tr>
            <td>
                <label>Gender</label>
            </td>
            <td>
                <label>
                    <input type="radio" value="f" name="gender"> Female</label>
                    <label>
                    <input value="m" type="radio" name="gender"> Male</label>
            </td>
        </tr>
        <tr>
            
            <td></td>
            <td>
                <input type="submit" value="Submit">
                <input type="reset">
            </td>
        </tr>
    </table>
</form>
Posted by: Guest on April-15-2021

Browse Popular Code Answers by Language