I m doing like this in java script :
document.getElementById(XYZ).value = '32768';
document.getElementById(ABC).value = '32768 ';
document.getElementById(XYZ).disabled = true;
document.getElementById(ABC).disabled = true;
when i m pressing submit it gives "0" as value. BUT i want to retrieve above values.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
readOnly is an option but it changes the FONT COLOUR from gray to black, but i want gray colored text in readOnly textbox
any help!!!!
开发者_StackOverflowthanx !!!
Disabling an element takes it out of the form. The value will not be transmitted.
The only solution is not disabling the element. Depending on what you want to do, for example the readonly
property could work for you.
I'd probably use readonly attribute and some CSS styles to gray them out like you want.
精彩评论