increment and decrement operator using javascript

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<script language="javascript" type="text/javascript">
function myfunction()
var Num1 = 10;
var Num2 = 20;
var Num3 = --Num1
var Num4 = ++Num2;
alert("Prefix decrement value=" + Num3);
alert("Prefix increment value=" + Num4);

<html xmlns="">
<head runat="server">
<form id="form1" runat="server">

<asp:Button ID="Button1" runat="server" Text="Button"
OnClientClick="return myfunction()" onclick="Button1_Click1" />


Comments or Responses

Login to post response