mickeymouse 0 Posted June 13, 2020 Report 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 Quote Link to post Share on other sites
Ingolme 1,027 Posted June 13, 2020 Report Share Posted June 13, 2020 Form elements cannot have HTML inside of them. Quote Link to post Share on other sites
Sherin 1 Posted August 6, 2020 Report Share Posted August 6, 2020 document.getElementById("lastentry") instead of document.getElementryById("lastentry") Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.