Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 当我在两个不同的id中使用两个函数时,会显示此错误。_Javascript_Html - Fatal编程技术网

Javascript 当我在两个不同的id中使用两个函数时,会显示此错误。

Javascript 当我在两个不同的id中使用两个函数时,会显示此错误。,javascript,html,Javascript,Html,我使用此代码调用select标记中的两个不同类。 未捕获引用错误:未定义更改 JQuery库未正确加载。在标签前添加以下代码: Call Class: function changeFunc() { var e = document.getElementById("select_func"); var strUser = e.options[e.selectedIndex].value; $('#panel1').find (

我使用此代码调用select标记中的两个不同类。

未捕获引用错误:未定义更改

JQuery库未正确加载。在标签前添加以下代码:

Call Class:

function changeFunc() 
      {
        var e = document.getElementById("select_func"); 
        var strUser = e.options[e.selectedIndex].value;  
        $('#panel1').find ('dl').removeAttr ('class').addClass(strUser)
      }
function changeFun() 
      {
       var er = document.getElementById("select_fun"); 
       var strUs = er.options[er.selectedIndex].value;   
       $('#panel2').find ('dl').removeAttr ('class').addClass(strUs)
      }

Theme1 Theme2错误消息显示
change\u Fun
,但函数名为
changeFun
。看到区别了吗?正文1

<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>