TECHNOSAVVIE: 8 JavaScript Codes That Can Come In Handy!

ezmob_search

adport_banner728x90

coinads

7search

zerads_728x90

multiwall_728x90

Search This Blog

Thursday, 6 March 2014

8 JavaScript Codes That Can Come In Handy!

Making your website stand out has a lot to do with the codes that you are using at the backend. Here are some that can help you! 

JavaScript can be used to add some snazzy features to your website. From disallowing the user from right clicking on your page, to adding hearts that follow the mouse cursor, you can do it all. Here are the codes for the same.
JavaScript, best JavaScript codes, top JavaScript codes, JS codes, learn JS, JS tutorials, top JS codes, best JS codes, learn JavaScript, JavaScript coding, JS coding




1. Your website becomes the user's homepage







JavaScript Free Code

2. A message box pops up when the page opens






JavaScript Free Code


3. Ban right click on the website

var message="Function Disabled!";
///////////////////////////////////
function clickIE() {if (document.all) {alert(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {alert(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// -->

JavaScript Free Code

4. Colourful scrollbar



JavaScript Free Code


5. Add a search engine to your page





style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid"
onchange="n = 0;" size=16 name=string>




JavaScript Free Code








6. Add fireworks to your page






JavaScript Free Code


7. Little hearts follow the mouse cursor when on your website

















JavaScript Free Code


8. Have moving stars in the background

msg = "..." + msg;pos = 0;
function scrollMSG() {
document.title = msg.substring(pos, msg.length) + msg.substring(0, pos);
pos++;
if (pos > msg.length) pos = 0
window.setTimeout("scrollMSG()",200);
}
scrollMSG();

JavaScript Free Code 

ezmob_inpage

Featured post

What should students, parents, and teachers know about AI?

AI education will help people understand the risks, limitations, and opportunities Former judge Kay Firth-Butterfield began to think about h...

multiwall_300x250