读书人

未结束的字符串常量 。找了半天 没找到

发布时间: 2012-05-28 17:59:33 作者: rapoo

未结束的字符串常量 。找了半天 没找到错误在哪
function getList(tbRow) {
var index = tbRow.rowIndex;
var newxtTr = document.all.tb_list.rows(index +1);

if(newxtTr.style.display == "") {
tbRow.cells(0).children[0].src = "../images/web_1.gif";
newxtTr.style.display = "none";
}
else {
tbRow.cells(0).children[0].src = "../images/web_2.gif";
newxtTr.style.display = "";

if(newxtTr.cells(1).innerHTML.trim().length == 0) {
newxtTr.cells(1).innerHTML = MyHealth_SearchReturn.GetCatalogList(tbRow.cells(1).innerHTML).value;
}
}
}


//20101222 ll 查询事件,不做编码操作,直接以原来编码过的url.
function searchClick() {
if(checkform())
{
var starDate = "&start=" + document.getElementById("starDate").value;
var endDate = "&end=" + document.getElementById("endDate").value;

var strHref = window.location.href;
var strUrl = strHref.match("(org_)?SearchReturn.*")[0];
if(strUrl.indexOf("start") != -1) {
strUrl = strUrl.replace(/(&?)start\=.*(&?)/ig, starDate);
}
else {
strUrl = strUrl + starDate;
}
if(strUrl.indexOf("end") != -1) {
strUrl = strUrl.replace(/(&?)end\=.*(&?)/ig, endDate);
}
else {
strUrl = strUrl + endDate;
}

window.location.href = strUrl;

}
else return false;
}

//20101222 ll url编码
function urlCoding(strUrl) {
var newUrl = encodeURI(strUrl);

if(navigator.appName == "Microsoft Internet Explorer") {
var linkEle = document.getElementById("hiddenLink");
linkEle.href = newUrl;
linkEle.click();
}
else {
window.location.href = newUrl;
}
}

[解决办法]
最后一个return false没有 加分号!!

读书人网 >JavaScript

热点推荐