<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Set Courser Focus</title> <script src="js/jquery-1.6.2.min.js" type="text/javascript"></script> <link href="js/jquery-ui-1.8.11.custom.css" rel="stylesheet" type="text/css" /> <script src="js/jquery-ui-1.8.11.custom.min.js" type="text/javascript"></script> <script language="javascript" type="text/javascript"> $(document).ready(function() { // // Click Event $("#body1").click(function(event) { $('#txtname').focus(); }); }); </script> </head> <body id="body1" onload="$('#txtname').focus();"> <form id="form1" runat="server"> <div > <asp:TextBox ID="txtname" AutoCompleteType="None" runat="server"></asp:TextBox> </div> </form> </body> </html>
$(document).ready(function() { // // Click Event $("#txtname").blur(function(event) { $('#txtname').focus(); }); });
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)