Disable HREF link

[Total: 0    Average: 0/5]

This example illistrates how to have href links disabled.

Body Code:

<a href="javascript:goNow('http://www.js-examples.com')"
   onmouseover="status='http://www.js-exampes.com';return true;"
   onmouseout="status='';">Click Link</a>
<a href="javascript:toggleLock()">Click to toggle lock on page</a>  
<form name=exf1>
<input type=text name=t1 value="false">
var LOCKED=false;
function goNow(_l){if(LOCKED)return;document.location=_l;}
function toggleLock(){LOCKED=!LOCKED;document.exf1.t1.value=LOCKED?"true":"false";}

Times Viewed: 3

Leave a Reply

Your email address will not be published. Required fields are marked *