Skip to content

Tag: html-input

HTML + JS: Clear File Input on button click

I want to tell my backend, I deleted the assigned file it already loaded: where the onclick function looks like: my problem now is: I can differentiate the request in the browser Network tab whether I do nothing or hit the delete button. Both times the input field does not show up. I wanted to add ipt.value=”DELETE” so I can

How to reset a date in Firefox input[type=date]?

Firefox v57.0.1 supports the attribute “date” for the HTML input tag. I would like in jQuery to reset the date value when the user click on a radio button like this: In order to get this result: My jQuery code: I tested: val(“”) val(null) val(“0000-00-00”) val( new Date() ) without any success… is there a solution? Answer To set an

Disable/enable an input with jQuery?

or Which is the standard way? And, conversely, how do you enable a disabled input? Answer jQuery 1.6+ To change the disabled property you should use the .prop() function. jQuery 1.5 and below The .prop() function doesn’t exist, but .attr() does similar: Set the disabled attribute. To enable again, the proper method is to use .removeAttr() In any version of