The code below works fine in Chrome but does not work in Firefox. The error displayed in the Firefox console is "Error: document.forms.frmCreateNewEmployee.elements is not a function".
document.forms['frmCreateNewEmployee'].elements('employeeType').value = document.getElementById("userType").options[document.getElementById("userType").selectedIndex].value;
How can I resolve this error开发者_开发技巧?
Change .elements('employeeType') to .elements['employeeType'] to fix the error.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论