I make a class selection by class name in the radio buttons, and it works. Then I want to make a class selection by name in text attachments and set values for any text. I couldn’t do this.
How can I make the same setting value for my text fields
Here is my code
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>Encuesta</title> <link href="css/smoothness/jquery-ui-1.9.1.custom.css" rel="stylesheet"> <link rel="stylesheet" type="text/css" href="css/main.css" /> <link href="css/helper.css" media="screen" rel="stylesheet" type="text/css" /> <script src="js/jquery-1.8.2.js"></script> <script src="js/jquery-ui-1.9.1.custom.js"></script> <title>Ejemplo Radio Button</title> <script> $(document).ready(function(){ var predeterminar=2; </script> </head> <body> <form name=fcolores> <table class="gridtable2"> <caption>3.5 ¿Cuál es la cantidad promedio de empleados en el año 2011 que al interior de su empresa se dedicaron a las siguientes actividades?</caption> <tr><td class="subtitulos">Informática y sistemas</td> <td> <input type="text" id="p074" name="p074" size="15" onkeypress="return RangoNumeroFormateado(this,0,0,event);" /></td> <td>Si <input type="radio" class="radiomarcado" id="p075" name="p075" value="1"/> No<input type="radio" class="radiomarcado" id="p075" name="p075" value="2" /></td></tr> <tr><td class="subtitulos">Investigación y desarrollo</td> <td> <input type="text" id="p076" name="p076" size="15" onkeypress="return RangoNumeroFormateado(this,0,0,event);" /></td> <td>Si <input type="radio" class="radiomarcado" id="p077" name="p077" value="1"/> No<input type="radio" class="radiomarcado" id="p077" name="p077" value="2" /></td></tr> <tr><td class="subtitulos">Ingeniería y diseño industrial</td> <td> <input type="text" id="p078" name="p078" size="15" onkeypress="return RangoNumeroFormateado(this,0,0,event);" /></td> <td>Si <input type="radio" class="radiomarcado" id="p079" name="p079" value="1"/> No<input type="radio" class="radiomarcado" id="p079" name="p079" value="2" /></td></tr> </table> </form> </body> </html>
source share