Javascript Placeholder (input) display ampersand text correctly? -


i have following code:

var inputsearchfield = document.createelement('input'); inputsearchfield.id = 'searchfield'; inputsearchfield.type = 'text'; inputsearchfield.placeholder = "rechercher un équipier"; searchdiv.appendchild(inputsearchfield); 

the result of above shows in browser (as placeholder text): rechercher un équipier

i expecting result be: rechercher un équipier.

is there way achieve above result?

you directly use respective unicode identifier, if document coded in utf8:

inputsearchfield.placeholder = "rechercher un \u00e9quipier"; 

Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -