Beginner PHP, the following is the implementation of text box content with the drop-down box changes in the code implementation:
<!DOCTYPE HTML Public "-//W3C//DTD XHTML 1.0 transitional//en" "http://www.w3.org/TR/xhtml1/DTD/ Xhtml1-transitional.dtd "><HTMLxmlns= "http://www.w3.org/1999/xhtml"><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" /><title>The value of the PHP text box changes with the drop-down box</title><Scripttype= "Text/javascript">varm= "5";d Ocument.getelementbyid ("Test"). Value=m;</Script><Scriptlanguage= "JavaScript">functionLook () {varSE=document.getElementById ("sel"); varoption=Se.getelementsbytagname ("option"); varStr= "" ; for(varI=0; I<option.length;++i) {if(option[i].selected) {document.getElementById ("Test"). Value=Option[i].text; } }}</Script></Head><Body><inputtype= "text"name= "Test"ID= "Test"><Selectname= "SEL"ID= "SEL"onchange= "look ();"><optionvalue= "1" >11</option><optionvalue= "2"selected>22</option><optionvalue= "3">33</option></Select></Body></HTML>
The value of the PHP text box changes with the drop-down box