alert('EnterBookCode'); $(document.activeElement).bind('click', function () { document.getElementById("<%=txtsearch.ClientID %>").focus(); });
function myFunction() { var x; var r= confirm("Press a button!"); if (r==true) { x="You pressed OK!"; } else { x="You pressed Cancel!"; } document.getElementById("demo").innerHTML=x; }
<button onclick="myFunction()">Press Me</button> <p id="demo"></p>
alert
alert('Your text here'); // the code that you put here will be executed after the user clicks OK in the alert box
confirm
if (confirm('Your text here')) { // user clicked on Yes } else { // user clicked on No }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)