html - Use a DIV as an input -


sorry if question basic, i'm trying programming , i'm stuck this.

i want have text input <div> in html, don't want default chat box comes <input>. want directly print location within <div>.

how can this?

you can use contenteditable attribute if don't wanna submit value server, :

<div contenteditable="true">i'm editable. edit me!</div> 

so user can edit text it's not gonna sent server , it's client side stuff.

but if need submit value server have use textarea or input tag , remove borders css styles. :

<input id="mytext" type="text" style="border:none; background: transparent; outline: 0;"/>