I need to transform this :
<input type="button" value="O">
In a text. Anyone can help me?
I need to transform this :
<input type="button" value="O">
In a text. Anyone can help me?
Using the following straight DOM code works just fine:
var input = document.createElement('input');
input.type = 'button';
document.body.appendChild(input);
input.type = 'text';
input.value = 'this is text';
more infos Here
If I have understood the question correctly following snippet you should do the trick:
$('input[type=button][value=0]').replaceWith(function() {
return document.createTextNode(this.outerHTML);
});
The above snippet basically replaces the element with it's string representation.
You can use in pure HTML like this.
<pre>
<input type="button" value="O">
</pre>
Using java script you can find and replace < >.
Ex: HTML.replace(/&/g, '&').replace(/</g, '<');