how to pass value of text to "a href"
I need you help me with asp code. I got a home page that contained User Name and Password for user to log in by using a href attribute and i don't know how to pass the value of text to a href to login.asp file. Please help me!
Example:
<table>
<tr>
<td>User</td>
<td><input type="text" id="user"/></td>
</开发者_开发问答tr>
<tr>
<td>Password</td>
<td><input type="password" id="pass"/></td>
</tr>
<tr>
<td><a href="login.asp?user=?????????????">Log in</a></td>
</tr>
</table>
First of all the username and password text box must be inside a form element
e.g.
<form name="myForm" id="myForm" method="post" action="login.asp">
<input type="text" name="username"/>
<input type="password" name="password"/>
<a href="#" onclick="document.myForm.submit()">Login</a>
</form>
and in your .asp page you can get the values as
Request.Form("username")
Request.Form("password")
精彩评论