mickeymouse Posted June 13, 2020 Share Posted June 13, 2020 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? Tks Link to comment Share on other sites More sharing options...
Ingolme Posted June 13, 2020 Share Posted June 13, 2020 Form elements cannot have HTML inside of them. Link to comment Share on other sites More sharing options...
Sherin Posted August 6, 2020 Share Posted August 6, 2020 document.getElementById("lastentry") instead of document.getElementryById("lastentry") Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now