gpt4 book ai didi

javascript - 语法错误 : identifier starts immediately after numeric literal asp. 网络

转载 作者:行者123 更新时间:2023-12-03 11:25:06 25 4
gpt4 key购买 nike

当我点击以下链接时,我收到 javascript 错误:

SyntaxError: identifier starts immediately after numeric literal

通过 Firebug :

<小时/>
<a href="javascript:void(0)" onclick="SubmitWithLog('HR','https://hr.test/hr/index.aspx?enc=ae%734II-.l%60%22%2c%sm67%1b'%3546bnv%2b!%1tyu)MQR%780%01%16LVWP%3b0M7ghnz%ef%bf%523jd%3b','#ctl273')" id="ctl562_ctrl11_hl_sys">HR</a>
<小时/>

我的.cs:

 void hl_DataBinding(object sender, System.EventArgs e)
{
HtmlGenericControl hl = (HtmlGenericControl)sender;

hl.InnerText = ((hl.NamingContainer as RadListViewDataItem).DataItem as DataRowView)["name"].ToString().TrimEnd();

string winURL = ((hl.NamingContainer as RadListViewDataItem).DataItem as DataRowView)["url"].ToString().TrimEnd();

HashSet<string> frmId = ((HashSet<string>)parent.Context.Session["blocks"]);
for (int i = 0; i < frmId.Count; i++)
{
if (frmId.ElementAt(i).Split('|')[1] == winURL)
{
hl.Attributes["onclick"] = "SubmitWithLog('" + hl.InnerText + "'" + "," + "'" + frmId.ElementAt(i).Split('|')[1] + frmId.ElementAt(i).Split('|')[2] + "'" + "," + "'#" + frmId.ElementAt(i).Split('|')[0].Trim() + "')";
hl.Attributes["href"] = "javascript:void(0)";
break;
}

}


}

最佳答案

也许第二个参数提前停止?

'HR','https://hr.test/hr/index.aspx?enc=ae%734II-.l%60%22%2c%sm67%1b'

即字符串内有一个单引号字符。

关于javascript - 语法错误 : identifier starts immediately after numeric literal asp. 网络,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26958209/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com