Sunday, October 10, 2010

Disable Back Button Not Include TextArea Or Input

<script type="text/javascript">

if (typeof window.event != 'undefined')
document.onkeydown = function()
{


if ((event.srcElement.tagName.toUpperCase() != 'TEXTAREA')|| (event.srcElement.tagName.toUpperCase() != 'INPUT'))
return (event.keyCode != 8);
}
else
document.onkeypress = function(e)
{

if (e.target.nodeName.toUpperCase() != 'TEXTAREA')
return (e.keyCode != 8);
}

</script>

No comments:

Post a Comment