我有一个带有下拉选择的菜单!
<select name="category" id="category" required><option value="0">Choose</option><button type="button" onclick="javascript:formsubmit();">Keres</button>
并继续价值。我有一个 kwicks 面板:
<div class='kwicks kwicks-horizontal'>
<a href='#' id='kwick1' onclick="javascript:playerrl(1);"></a>
<a href='#' id='kwick2' onclick="javascript:playerrl(2);"></a>
<a href='#' id='kwick3' onclick="javascript:playerrl(3);"></a>
<a href='#' id='kwick4' onclick="javascript:playerrl(4);"></a>
<a href='#' id='kwick5' onclick="javascript:playerrl(5);"></a>
<a href='#' id='kwick6' onclick="javascript:playerrl(6);"></a>
<a href='#' id='kwick7' onclick="javascript:playerrl(7);"></a>
</div>
我的选择菜单上有一个 javascript 事件:
<script>
function formsubmit(){
var cat = document.getElementById("category").value;
var search = document.getElementById("search").value;
var iframe = document.getElementById("player");
$(container).kwicks('expand', cat);
iframe.src = "video/index.php?keres="+search+"&category="+cat;
}
</script>
它检查选定的值,更改 iframe src,现在不起作用的是用选定的值扩展 kwicks 面板!萤火虫 说:
ReferenceError: container is not defined
但它在 kwicks.js 中!为什么我会收到此错误?