Counting length of word with javascript

Jitendrasoft09
Posted by Jitendrasoft09 under ASP.NET category on | Points: 40 | Views : 790
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script language="javascript" type="text/javascript">
function myfunction()
{
var objCount = "Jitendra";
alert(objCount.length);
alert(objCount);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button"
OnClientClick="return myfunction()" onclick="Button1_Click1" />

</div>
</form>
</body>
</html>

Comments or Responses

Login to post response