avivar avivar - 2 years ago 63
Javascript Question

Is it possible to highlight part text of input button value?

I'm trying to bold part of the text inside an input button value.
HTML doesn't work inside the value attribute, so tags like

<b>
and
<strong>
and also methods like
bold()
won't work.

Is it possible to bold just part of the text?

Answer Source

Using an input of type button and adding HTML to the value won't work, but you can just use a button element instead

<button><strong>Hello</strong> Kitty</button>

FIDDLE

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download