JS text box append multiple Drop-down box of the value of a simple example

Source: Internet
Author: User
This article describes the JS text box to append multiple Drop-down box Value example, the need for friends can refer to the copy code code as follows:




<HTML>


<HEAD>


<TITLE> New Document </TITLE>


<meta name= "generator" content= "EditPlus" >


<meta name= "Author" content= "" >


<meta name= "Keywords" content= "" >


<meta name= "Description" content= "" >


<script language= "JavaScript" >


function doit (ofrm) {


//ofrm.t1.value=parseint (Ofrm.s1.value) +parseint (ofrm.s2.value) +parseint (ofrm.s3.value) +parseint ( Ofrm.s4.value);


Ofrmofrm.t1.value=ofrm.s1.value+ofrm.s2.value+ofrm.s3.value+ofrm.s4.value;


}


</script>


</HEAD>


<BODY>


<form name= "Tfrm" >


<select name= "S1" onchange= "Javascript:doit" (this.form); " >


<option value= "*" selected> please choose </option>


<option value= "1" >1</option>


<option value= "2" >2</option>


<option value= "3" >3</option>


</select>


<select name= "S2" onchange= "Javascript:doit" (this.form); " >


<option value= "*" selected> please choose </option>


<option value= "1" >1</option>


<option value= "2" >2</option>


<option value= "3" >3</option>


</select>


<select name= "S3" Onchange= "Javascript:doit" (this.form); " >


<option value= "*" selected> please choose </option>


<option value= "1" >1</option>


<option value= "2" >2</option>


<option value= "3" >3</option>


</select>


<select name= "S4" onchange= "Javascript:doit" (this.form); " >


<option value= "*" selected> please choose </option>


<option value= "1" >1</option>


<option value= "2" >2</option>


<option value= "3" >3</option>


</select>


<input type= "text" name= "T1" "value=" ">


</form>


</BODY>


</HTML>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.