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>
<BR><BR>
<a href="javascript:toggleLock()">Click to toggle lock on page</a>  
<BR><BR>
<form name=exf1>
<input type=text name=t1 value="false">
</form>
<script>
var LOCKED=false;
function goNow(_l){if(LOCKED)return;document.location=_l;}
function toggleLock(){LOCKED=!LOCKED;document.exf1.t1.value=LOCKED?"true":"false";}
</script>

Times Viewed: 1

Leave a Reply

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