Stop IE6 overwriting Button text when setting value.
- by RoToRa
I've got a button which contains a span I need for styling:
<button id="example" name="example" value="Example"><span>Example</span></button>
IE6 has a bug that it submits the contents of the button instead of it's value, but I've already worked around that.
Now I need to change the value of the button and the text in the span in JavaScript/jQuery:
jQuery("#example").val("Changed").children("span").text("Changed");
However IE6 also changes the contents of the button when setting the value per JavaScript/jQuery, so that the span is lost.
Does any one know of a way other that identifying IE6 with jQuery.browser that I could use to avoid that?