首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Asp和javascript错误:消息:预期的')‘

Asp和javascript错误:消息:预期的')‘
EN

Stack Overflow用户
提问于 2018-06-26 05:14:17
回答 3查看 75关注 0票数 0

我知道以前有人问过这个问题,我也尝试过使用这些解决方案来解决我的错误,但我无法使用过去类似问题的解决方案。错误消息是它需要一个')‘。我试过添加和删除括号,以及删除单引号和双引号,但每次都会出错?

代码语言:javascript
运行
复制
protected void btnTestCS_Click(object sender, EventArgs e)
{

string result1 = "Failed: The samAccountName IdentityType must be in the form \"domainname\\userName\", \"machinename\\userName\", or \"userName\". | NN-NN-NN-01.NN.NN.NNNNN.NNN | CN=^sharing,OU=xxx_xxxxxx,OU=xxxxx,OU=xxxx,OU=xxx,OU=xxxxx,DC=xx,DC=xx,DC=xxx,DC=xxxxx)";
ScriptManager.RegisterStartupScript(Page, this.GetType(), "errorRunExchangeShellMultiCommandsss", "javascript:showDialogError(" + result1 + ")" , true);

}

    function showDialogError(results) {
        results = results.replace("'", "\\'");
        results = results.replace("\"", "");
        $("#dialogFailureText").text(results);
        $("#dialogFailure").dialog({
            modal: true,
            title: 'Something went wrong',
            text: results,
            buttons: {
                OK: function () {
                    $(this).dialog("close");
                }
            }


        });
    }
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51031878

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档