- I need to have an
onclick
event on an<input>
tag which is disabled. - Here
onclick
event doesn't work. - Is there any other way to work with
onclick
event for disabled input based on id? - I tried the code below.
- First
input
worked but I need worked same as second one also same as of first one. (I need to call functionClicked
oninput
only).
My code:
function Clicked(event)
{
alert(event.id)
}
function ClickedDisabled(event)
{
alert(event.ids)
}
<input type="text" id="ID" onclick="Clicked(this)" />
<input type="text" id="IDs" onclick="ClickedDisabled(this)" disabled />