Why Is My Code Not Working?
I just wrote this code and when I tested it, the javascript wouldn't work. I have javascript enabled and I tried with a different code and it worked. I think there's maybe a bug bu
Solution 1:
You are using smart quotes (“”
) instead of normal quotes (""
). Replace the quotes and it will work.
<pid="id">Some Text</p><script>document.getElementById("id").innerHTML="Different Text";
</script>
Perhaps this is because you are using a word processor, not an IDE?
Post a Comment for "Why Is My Code Not Working?"