javascript - Can someone help with this self invoking function stuff? -
I was trying to debug this script all day and I have not found anything that much help was appreciated Will go.
I get an error that it is a curly brace or a square brace or a parent is missing and whenever I try to get the value of my options, it is said that x is undefined , But when I input 0 as my index, I can retrieve the opts.value, my question is why x is undefined and what is missing from this script
OK, if that script & lt; Head & gt;
Trying to prepare the DOM elements of your document before reading it, unless you are calling it through onload, which you are not showing.
Your second option is & lt; Script & gt; ... & lt; / Script & gt; Just before the closing body on the bottom of my page, though I can not believe 100% that this problem is because you have not posted your HTML, it is a fair estimate if you are getting undefined DOM elements.
Comments
Post a Comment