Is there a reason you want it like that? Not sure if there is an option to render it like that, but you can always put it in a variable and do a (regex) replace.
It must be a jQuery bug, so you should try a fix with them.
Input doesn't have a "closing tag" and most often it will cause DOM errors.
You don't use xhtml syntax when coding in HTML.
The jQuery documentation includes the following note for its
.html() method :
This method uses the browser's innerHTML property. Some browsers may not return HTML that exactly replicates the HTML source in an original document. For example, Internet Explorer sometimes leaves off the quotes around attribute values if they contain only alphanumeric characters.
So the text returned by the method is synthetic and browser-dependent. jQuery makes no attempt to normalise it, and you can make no assumtions about which flavour of HTML is used.
I think it's reasonable to say that :
.html()in the same browser (as will normally be the case)
.html()in one browser, into another browser or into a document with a different doctype (eg via a server-side database).
It's also probably reasonable to say that an HTML string previously returned by
.html() should be used for nothing other than immediate, same-document re-injection. As no assumptions can be made regarding the flavour of HTML returned, the string should not be manipulated. Instead, you can create an unappended (or appended) document fragment with
$(htmlString) then manipulate the fragment, as required, with jQuery manipulation methods.
Edited by Airshow
Hello, i know this question has been asked a million times but I just cant seem to get it right. I googled and found this and tried to use the ...
How to take part of url and store it into a variable?
/home/pages/id --> I want to take id out and store it into $id.
How to do ...
I am working with a simple PHP form with few fields and few uploads. I want to use the Modal pop up form for this.
Below codes are ...