Opened 13 years ago
Closed 13 years ago
#7550 closed bug (invalid)
Different results of html() function in different browsers
Reported by: | krishnafru | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.5 |
Component: | unfiled | Version: | 1.4.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Hi,
I am facing a problem with html function. below is the code snippet:
<div id="div_container"> <input type="text" id="txt_name" value="sample text" style="width:250px;" /> </div>
Suppose later user changed the txt_name value from "sample text" to "changed text".
Now if i call
alert($('#div_container').html());
in IE the alert window shows
<input type="text" id="txt_name" value="changed text" style="width:250px;" />
but in FF
<input type="text" id="txt_name" value="sample text" style="width:250px;" />
Note: See
TracTickets for help on using
tickets.
Thanks for taking the time to contribute to the jQuery project by writing a bug ticket!
The documentation states:
As IE does in this case. IE seems to change the innerHTML although this shouldn't be the case.