How to bind a click event to jquery single-producer radio
This article describes how to bind a click event to jquery single-worker radio to respond to changes in the single-worker radio value. It is of practical value. For more information, see
This article describes how to bind a click event to jquery single-click radio. Share it with you for your reference.
The specific implementation method is as follows:
The Code is as follows:
<Html>
<Head>
<Title> click events bound to a single worker radio </title>
<Meta http-equiv = "content-type" content = "text/html; charset = UTF-8"/>
<Script type = "text/javascript" src = "jquery-1.8.2.min.js"> </script>
<Script type = "text/javascript">
$ (Function (){
$ (": Radio"). click (function (){
Alert ("you are..." + $ (this). val ());
});
});
</Script>
<Style type = "text/css">
H5 {color: blue ;}
Textarea {resize: none ;}
# Word {color: red ;}
</Style>
</Head>
<Body>
<H5> click events bound to a single worker radio <Form action = "" method = "">
<Input type = "radio" name = "gender" value = "male"> male
<Input type = "radio" name = "gender" value = ""> female
<Input type = "radio" name = "gender" value = "Chun ge"> Chun Ge
</Form>
</Body>
</Html>
I hope this article will help you with jQuery programming.