早期此代码工作正常。但不知道突然停止工作..更改代码位置后。
give error :
- Uncaught TypeError: Cannot read property 'options' of undefined (in chrome)
- no element found (in firefox)
var inputs = document.getElementsByTagName("select"); //get array of select tag
var sSrnti = inputs[0].options[inputs[0].selectedIndex].value; //get selected value of first list
var sType = inputs[1].options[inputs[1].selectedIndex].value;//get selected value of second list
var sStatus = inputs[2].options[inputs[2].selectedIndex].value;//get selected value of third list
请帮助我..谢谢