Like:
abcdef
_
What HTML character code I need to insert before b
to make b underlined?
I need this inside a html attribute (value of a input field), so html tags like <u>
are not acceptable
example:
<input type="submit" value="UnderlineMeifUknowHow" accesskey="n" />
I want the first "n" from UnderlineMeifUknowHow to be underlined
You can simply put ̲
after any word and it becomes underlined, its a HTML Code.
<input type=button value=S̲end>
It becomes:
S̲end
But you can create a JavaScript function to do it for you, see:
function underlineWord(pos,str){
str = str.substring(0,pos) + str[pos] + "̲" + str.substring(pos+1,str.length);
return str;
}
This way, if you execute:
underlineWord(0,"string");
You will have:
s̲tring
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With