[asp.net] Press the key to jump and press ENTER to submit with different parameters, and other induction events

Source: Internet
Author: User
asp.net
<meta http-equiv= "Content-language" content= "ZH-CN" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<title> button Jump Test </title>
<script language=javascript>
function KeyPress ()
{
Akey = Event.keycode;
if (Akey ==13)
{
Gotourl = ' find.aspx? ' +event.srcelement.name+ ' = ' +event.srcelement.value;
window.open (Gotourl);
}
}
function Keytab1 (event)
{
Akey = Event.keycode;
if (Akey ==13)
{
Document.forms[0]. Useraddr.focus ();
}
}
function Keytab2 (event)
{
Akey = Event.keycode;
if (Akey ==13)
{
Document.forms[0]. Userphone.focus ();
}
}
function Converttoupper (textbox)
{
Textbox.value = Textbox.value.toUpperCase ();
}

function Checknum (str)
{
Return Str.match (/d/) ==null
}

</script>
<style>
<!--
body {font-size:10pt; font-family: Arial}
div {border-style:ridge; border-width:1px; padding:10px; Background-color: #DAF4FE}
-->
</style>

<body onload= "javascript:document.forms[0]. Userid.focus () ">
<div style= "WIDTH=254PX; Height:134px ">
<form method= "POST" >
<b> Query Conditions </b>
<HR>
User code: <input type= "text" name= "USERID" size= "onmouseover=" This.focus () "onkeypress=" KeyPress () "onfocus=" This.select () "><font face=" Webdings ">N</font><br>
User name: <input type= "text" name= "USERNAME" size= "onmouseover=" This.focus () "onkeypress=" KeyPress () "onfocus=" This.select () "><font face=" Webdings ">N</font><br>
User tel: <input type= "text" name= "Userphone" onmouseover= "This.focus ()" Onchange= "Converttoupper (This)" onkeypress= " KEYTAB1 (event) "onfocus=" This.select () "><br>
User address: <input type= "text" name= "useraddr" onmouseover= "This.focus ()" Onchange= "Converttoupper (This)" onkeypress= " KEYTAB2 (event) "onfocus=" This.select () ">
</FORM>
</div>
</body>





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.