<script type="text/javascript"> function onclickbtn(buttonName,e) | |
{ | |
//the purpose of this function is to allow the enter key to | |
//point to the correct button to click. | |
var key; | |
if(window.event) | |
key = window.event.keyCode; //IE | |
else | |
key = e.which; //Firefox | |
if (key == 13) | |
{ | |
var btn = document.getElementById(buttonName); //Get the button the user wants to have clicked | |
if (btn != null) | |
{ //If we find the button click it | |
btn.click(); | |
event.keyCode = 0 | |
} | |
} | |
} | |
</script> --------------------------------------------------------------------- In Html <input name="ctl00$ContentPlaceHolder1$pwd" type="password" id="ctl00_ContentPlaceHolder1_pwd" onKeyPress="onclickbtn('ctl00_ContentPlaceHolder1_LoginBtn1',event)" style="width:75%;" /></td> |
Jan 6, 2011
How to press enter key
Subscribe to:
Post Comments (Atom)
-
Remarks This property specifies the appearance of the embedded Windows Media Player. When uiMode is set to "none", "mini...
-
<body> <form id="form1" runat="server"> <img class="RibbonL" src="Imag...
-
Partial Class Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Lo...
What is the use of n-tier architecture and 3-tier architecture?
how to implement 3-tier architecture in asp.net using c#. 3-Tier architecture is also called layered architecture. Some people called it ...
No comments:
Post a Comment