Apply for Zend Framework Certification Training

Javascript





 

<script>
function maketextbox(nooftextbox){
    my_div.innerHTML ='';
    var j  = nooftextbox;
    for(i=1;i<=j;i++)
    {
    my_div.innerHTML = my_div.innerHTML +'<input name = "mytext' + i + '" type="text" id = "mytext' + i + '" />'
    }
}
</script>
</head>
<body>

<select name="s1" onchange="maketextbox(this.value)"
    <option value  ="0">Select</option
    <option value  ="1">1</option
    <option value  ="2">2</option
    <option value="3">3</option
    <option value="4">4</option
    <option value="5">5</option
</select
<div id="my_div"></div>

</body>

 For Validation of Textbox
function validate() {
      var boxes = $("#details input:text.classname");
      boxes.each(function(){
          var currentVal = $(this).val();
          // do your validation here
      });
   }       

< Exception handling in javascript Last >



Ask a question



  • Question:
    {{questionlistdata.blog_question_description}}
    • Answer:
      {{answer.blog_answer_description  }}
    Replay to Question


Back to Top