JSFiddle - React, Tailwind, and code Playground

by Tan

HTML

<div>DISABLE LINK:</div>

<a href="https://www.kisbridgingloans.co.uk" onclick="disMe();" id="me" target="new">click me!</a>


<div>REMOVE VALUE:</div>

<a href="#" onclick="disMe2();">click me!</a>

<input type="text" id="me2" value="hello">

JavaScript

function disMe() {

document.getElementById('me').removeAttribute('href');

}

function disMe2() {

document.getElementById('me2').removeAttribute('value');

}