Javascript Computer Tricks

Javascript Computer Tricks

Edit Websites in Browser (Live)

Using this trick, you will be able to edit any webpage live in your browser as if it was a Wiki and change the details according to your wish.

use the following bookmarklets by dragging them to your Bookmarks bar.


Edit This Website


Done Editing


You can edit Google or even Facebook for that matter right in your browser and that too without requiring any technical know-how


Mouse over prompt

A mouse over allows you to prompt the person when their mouse is over a particular link or picture; great for letting someone know what a picture is, if the image is small.


<div style=”text-align:center”>

<table style=”width:40%”>


<td align=”right”><a href=”” onmouseover=”alert(‘Created by PC Moment’)”>Who created this?</a></td>





Your own prompt


Crate a prompt of any inputted text to learn how the JavaScript alert function works and what a prompt looks like in your browser.


<div style=”text-align:center”>


<textarea cols=”30″ name=”text” rows=”3″></textarea>



<div style=”text-align:center”>


<input onclick=”alert(this.form.text.value)” type=”button” value=”Say it!”>

<input name=”cancel” type=”reset” value=”Clear Prompt”>





Letter by letter scroll

Below, the message “There is Hope – Computer Hope” should display, letter by letter.

<p id=”scroller”></p>

<script type=”text/javascript”>

// Original: Pun Man Kit

function scroll(position) {

var msg = ” Hello, Share with your friends. Thanks “;

var out = “”;

var sc = document.getElementById(“scroller”);

for (var i=0; i < position; i++){

out += msg.charAt(i);


out += msg.charAt(position);

sc.innerHTML = out;


if (position != msg.length) {

window.setTimeout(function() { scroll(position); }, 50);


else {

window.setTimeout(function() { scroll(0); }, 2000);







Random quotes

<script type=”text/javascript”>

//store the quotations in arrays

quotes = [];

authors = [];

quotes[0] = “I have a new philosophy. I’m only going to dread one day at a time.”;

authors[0] = “Charles Schulz”;

quotes[1] = “Reality is the leading cause of stress for those in touch with it.”;

authors[1] = “Jack Wagner”;

quotes[2] = “Few things are harder to put up with than the annoyance of a good example.”;

authors[2] = “Mark Twain”;

quotes[3] = “The pure and simple truth is rarely pure and never simple.”;

authors[3] = “Oscar Wilde”;

quotes[4] = “There’s no business like show business, but there are several businesses like accounting.”;

authors[4] = “David Letterman”;

quotes[5] = “Man invented language to satisfy his deep need to complain.”;

authors[5] = “Lily Tomlin”;


//calculate a random index number

index = Math.floor(Math.random() * quotes.length);


//display the quotation


document.write(“<DT>” + “\”” + quotes[index] + “\”</DT>\n”);

document.write(“<DD>” + “– ” + authors[index] + “</DT>\n”);





Leave a Reply

Your email address will not be published.