<! DOCTYPE HTML Public"-//W3C//DTD XHTML 1.0 transitional//en" "HTTP://WWW.W3.ORG/TR/XHTML1/DTD/XHTML1-TRANSITIONAL.DTD">"http://www.w3.org/1999/xhtml">"Content-type"Content="text/html; Charset=utf-8"/><title> Untitled Document </title><script type="Text/javascript">function ol () {vart=document.forms[0].elements[0].value; document.getElementById ("JG"). innerhtml=t;}</script><scrip>"Form1"action="wwww.baidu.com"Method="Post"><p> User name: <input type="text"Name="username"Id="UID"Value="User"/></p><p> Secret code: <input type="Password"Name="pwd"/></p><input type="Submit"Value="Submit"onclick="ol ()"/></form><p id="JG"></p></body>Note: These types of questions are implemented by calling functions (methods). Through the function implementation function, through the getElementById to determine the location of the page to display the information, call the function through the onclick. The core function statement of a function is to take advantage of the step determination to get the property value of the object, noting that each step gets the property with "." Separated.
Javascript_form submit button to get user name