Question: I need to transform this :

```
<input type="button" value="O">

```

In a text. Anyone can help me?

Answer: 
```
$('input')[0].outerHTML

```

[demo](https://jsfiddle.net/p4yywzt7/)

[Get selected element's outer HTML](https://stackoverflow.com/questions/2419749/get-selected-elements-outer-html)
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](https://stackoverflow.com/questions/1544317/change-type-of-input-field-with-jquery)