Jump to content

Text Coloring


Recommended Posts

I believe my code matches the W3Shool documentation.

It works well in W3S example but it doesn't work in my page.

I get a blank result.

function myentry()
{var mycode='B';
var myres = mycode.fontcolor('red');
document.getElementryById('lastentry').innerHTML = myres; return true;}

if I use:   document.EntryForm.lastentry.value = result; return true;}

I get:     <font color="red">B</font>

Any idea why?


Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...