javascript - Append Symbols like ♀ to an input text field -


i'm creating simple search utility , needs able use characters ♀ , ♂. make easier, i'm creating buttons append characters field. however, can't figure out how append field.

i'm using following right now:

function addfemale() {     document.getelementbyid('searchfield').value += "♀"; } 

however, adds ♀ text field. how can make work?

try add meta tag <meta charset="utf-8"> on page in <head> tag. meta tag specifies character encoding html document.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -