js代码里参数为汉字就提示undefined帮忙看一下
现在给的参数是汉字就会提示undefined有两段代码我不知道是哪有问题所有都贴上了,完全小白,求大神帮忙
var place = {
async: {
enable: true,
url:"DataAction.aspx?act=place",
autoParam:[],
otherParam:[],
dataFilter: null
},
data: {
key: {
title:"t"
},
simpleData: {
enable: true
}
},
callback: {
onClick: SearchByGPlace
}
};
function SearchByGPlace(event, treeId, treeNode, clickFlag) {
$("#store").text(treeNode.t);
$("#selnum").text("1");
var res = Com.BC863.Web.ClassifySearch.SearchByPlace(1, treeNode.t, false, "", "");
if(res.error) return showAjaxProError(res.error);
//$(".SeaCon").css("padding-top","20px");
$(".SeaCon").html("");
$(".SeaCon").html(res.value);
$(".xnl").height($(".sml_left").height());
var check=document.getElementById("tj1");
check.checked = false;
}
function QieHuanPage2(page, placeid, isrig, key, word){
$("#selnum").text("1");
var res = Com.BC863.Web.ClassifySearch.SearchByPlace(page, placeid, isrig, key, word);
if(res.error) return showAjaxProError(res.error);
//$(".SeaCon").css("padding-top","20px");
$(".SeaCon").html("");
$(".SeaCon").html(res.value);
$(".xnl").height($(".sml_left").height());
}
还有段代码
function LeiBieChange()
{
var num = $("#explei").val();//下拉框选中的是哪个
var check=document.getElementById("tj1");//复选框
check.checked = false;
$("#stype").val("bkname");//搜索类型
$("#w").val("");//搜索框
$('.xnr_tree ul.nod').children().eq(num).addClass('active').siblings().removeClass('active');
}
//复选框选中事件
function CkZhong()
{
var check=document.getElementById("tj1");
var cnclass = $("#cnclass").text();//中国分类号
var store = $("#store").text();//馆藏地
var dcgl = $("#dcgl").text();
if(check.checked==true)
{
var num = $("#selnum").text();
if(num == 0)//中国分类号查询
{
if(cnclass == "")
{
check.checked = false;
return;
}
var res = Com.BC863.Web.ClassifySearch.SearchByZhongTu(1, cnclass, true, "", "");
if(res.error) return showAjaxProError(res.error);
//$(".SeaCon").css("padding-top","20px");
$(".SeaCon").html("");
$(".SeaCon").html(res.value);
$(".xnl").height($(".sml_left").height());
$("#w").val("");//搜索框
$("#stype").val("bkname");//搜索类型
}
else if(num == 1)//馆藏地查询
{
if(store == "")
{
check.checked = false;
return;
}
var res = Com.BC863.Web.ClassifySearch.SearchByPlace(1, store, true, "", "");
if(res.error) return showAjaxProError(res.error);
//$(".SeaCon").css("padding-top","20px");
$(".SeaCon").html("");
$(".SeaCon").html(res.value);
$(".xnl").height($(".sml_left").height());
}
else if(num == 2)//馆藏分类查询
{
if(dcgl == "")
{
check.checked = false;
return;
}
var res = Com.BC863.Web.ClassifySearch.SearchByClass(1, dcgl, true, "", "");
if(res.error) return showAjaxProError(res.error);
//$(".SeaCon").css("padding-top","20px");
$(".SeaCon").html("");
$(".SeaCon").html(res.value);
$(".xnl").height($(".sml_left").height());
}
else if(num == 3)//默认
{
var res = Com.BC863.Web.ClassifySearch.BookBand(1, true, "", "");
if(res.error) return showAjaxProError(res.error);
//$(".SeaCon").css("padding-top","20px");
$(".SeaCon").html("");
$(".SeaCon").html(res.value);
$(".xnl").height($(".sml_left").height());
}
}
else
{
var num = $("#selnum").text();
if(num == 0)
{
if(cnclass == "")
{
return;
}
var res = Com.BC863.Web.ClassifySearch.SearchByZhongTu(1, cnclass, false, "", "");
if(res.error) return showAjaxProError(res.error);
//$(".SeaCon").css("padding-top","20px");
$(".SeaCon").html("");
$(".SeaCon").html(res.value);
$(".xnl").height($(".sml_left").height());
$("#w").val("");//搜索框
$("#stype").val("bkname");//搜索类型
}
else if(num == 1)
{
if(store == "")
{
check.checked = false;
return;
}
var res = Com.BC863.Web.ClassifySearch.SearchByPlace(1, store, false, "", "");
if(res.error) return showAjaxProError(res.error);
//$(".SeaCon").css("padding-top","20px");
$(".SeaCon").html("");
$(".SeaCon").html(res.value);
$(".xnl").height($(".sml_left").height());
}
else if(num == 2)
{
if(dcgl == "")
{
check.checked = false;
return;
}
var res = Com.BC863.Web.ClassifySearch.SearchByClass(1, dcgl, false, "", "");
if(res.error) return showAjaxProError(res.error);
//$(".SeaCon").css("padding-top","20px");
$(".SeaCon").html("");
$(".SeaCon").html(res.value);
$(".xnl").height($(".sml_left").height());
}
else if(num == 3)//默认
{
var res = Com.BC863.Web.ClassifySearch.BookBand(1, false, "", "");
if(res.error) return showAjaxProError(res.error);
//$(".SeaCon").css("padding-top","20px");
$(".SeaCon").html("");
$(".SeaCon").html(res.value);
$(".xnl").height($(".sml_left").height());
}
}
}