Make Html Hidden Input Visible
I want to change an invisible HTML input in to visible when I click a button as shown below. My HTML line that create the hidden input is: ,'text');
//or
y.type = 'text';
1) Either user java script inside body tag as below :
<inputtype="hidden"id="txtHiddenUname"value="invalid input" /><scripttype="text/javascript">var y = document.getElementById("txtHiddenUname");
y.type= "text";
</script>
OR
2) Use some event handler such as onload
<head><scripttype="text/javascript">functionon_load(){
var y = document.getElementById("txtHiddenUname");
y.type= "text";
}
</script></head><bodyonload = "on_load()"><inputtype="hidden"id="txtHiddenUname"value="invalid input" />
...
so that the DOM is ready.
Solution 2:
Here is not matter of CSS it's matter of attributes, So you need to change the attribute type
from hidden
to something else like text
Kindly check this [how-to-change-html-object-element-data-attribute-value-in-javascript][1]
check this: How to change HTML Object element data attribute value in javascript. To change the attribute value using jQuery or Javascript
Post a Comment for "Make Html Hidden Input Visible"