我的jquery有错误?这是什么样的错误? [英] i have error in my jquery? what kind of error this?
本文介绍了我的jquery有错误?这是什么样的错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
未捕获错误:语法错误,无法识别的表达式:#[object Object],请回答我这是什么错误。
这是代码......
Uncaught Error: Syntax error, unrecognized expression: #[object Object], what kind of error this please answer me.
This is the code...
<script type=text/javascript>
function Cascading(parentddl, childddl, controllername, actionname, isaddempty) {
$('#'+parentddl).val().live('change', function () {
var idModel = $(this).val().toString();
$.getJSON("/" + controllername + "/" + actionname, { id: idModel },
function (ddlData) {
var selectvalue = $('#'+childddl);
selectvalue.empty();
var ds = selectvalue.data().kendoDropDownList.dataSource;
selectvalue.data(kendoDropDownList").dataSource.data([]);
selectvalue.val().data("kendoDropDownList").text();
$.each(ddlData, function (index, itemData) {
selectvalue.data(kendoDropDownList").dataSource.add({ text: itemData.Text, value: itemData.Value });
});
});
});
}
</script>
推荐答案
(' #' + parentddl).val()。live(' 更改',函数(){
var idModel =
('#'+parentddl).val().live('change', function () { var idModel =
( this )。val()。toString();
(this).val().toString();
。 getJSON( / + controllername + / + actionname,{id:idModel},
function (ddlData){
var selectvalue =
.getJSON("/" + controllername + "/" + actionname, { id: idModel }, function (ddlData) { var selectvalue =
这篇关于我的jquery有错误?这是什么样的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文