Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript" src="jquery-1.7.1.min.js"></script>
- <input type="radio" id="sample" name="sample" value="1" />
- <input type="radio" id="sample" name="sample" value="2" />
- <input type="radio" id="sample" name="sample" value="3" />
- <script type="text/javascript">
- <!--
- $(document).ready(function(){
- $("#sample").click(function(){
- if($('input[name=sample]:checked').val()=="1"){
- $('<input id="ok" type="text">').appendTo('#addText');
- }
- });
- });
- function test(){
- alert($("#ok").val());
- }
- -->
- </script>
- <div id="addText"></div>
- <input type="button" id="text" onclick="test();">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement