Home » Posts tagged "Javascript" (Page 3)

Archive for the 'Javascript' Tag

Disable Back Button

My .aspx Page <%@ Page Language=”VB” AutoEventWireup=”false” CodeFile=”Page1.aspx.vb” Inherits=”_Default” %> <!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>Page 1</title> <script type = “text/javascript” > function preventBack(){window.history.forward();} setTimeout(“preventBack()”, 10); window.onunload=function(){null}; </script> </head> <body> <form id=”form1″ runat=”server”> <h1>My Page</h1> <div> Take me to Google<br /> <asp:Button ID=”Button1″ runat=”server” Text=”Google” /> </div> […]

Simple Javascript Calculator

This is simple javascript calculator <html> <head> <title>Calculator</title> <script language=”javascript”> var inputstring=” ” function updatestring(value) { inputstring += value; document.calculator.input.value=inputstring; } </script> <style type=”text/css”> #tb-lo { /*background: url(Calc-bg.png); */ height: 222px; width: 198px; padding: 2px 2px 2px 2px; background-image: url(Calc-bg.png); background-repeat: no-repeat; } #td-key { text-align: center; } </style> </head> <body> <form name=”calculator”> <table id=”tb-lo”> […]