in this code to not working with login or submit in to direct
submit or login with enter key to press
<script type="text/javascript">
//attempting to capture keypress for chrome here but this is not working
$("#txtContainer").keypress(function (e) {
if (e.keyCode == '13') {
e.preventDefault();
doClick(buttonname, e);
return false;
}
});
function doClick(buttonName, e) {
var key;
if (window.event)
key = window.event.keyCode; //IE
else
key = e.which; //firefox
if (key == 13) {
var btn = document.getElementById(buttonName);
if (btn != null) {
btn.click();
event.keyCode = 0
}
}
}
</script>
05:05
|
Category:
|
0
comments
Comments ( 0 )