How can Get focus on textbox when page load in

Hello friends today you will learn how to use javascript function and call him on body load in

Step 1: You make a new web site as You know and then Select Your Default.aspx page and Go into source of your page

And Write down code as given below

<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>
DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”&gt;
<head runat=”server”>
<script type=”text/javascript” language=”javascript” >
function getfocus() {
<body onload=”Javascript:getfocus()”>
<form id=”form1″ runat=”server”>
<input id=”Text1″ type=”text” runat=”server”  /></div>
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s