我想删除工具提示

I want to remove the Tool tip

本文关键字:工具提示 删除      更新时间:2023-09-26

我想删除工具提示,"Do you really want to remove the agent?"在我的web应用程序。问题是,如果我删除工具提示,确认对话框中的内容也会被删除。我想删除,只删除工具提示。以下是我的代码:

function remove(cellvalue, options, rowObject) {
    var sessionEnterpriseId = '<%= session.getAttribute("enterpriseId")%>';
    var sessionRoleId = '<%= session.getAttribute("role")%>';
    if(sessionRoleId == 2) {
        if(rowObject.enterpriseId == sessionEnterpriseId) {
            return "<a href='javascript:confirmDelete("+ rowObject.id +")' ><img src='./images/remove.gif' title='Remove Agent'><div id='dialog-confirm' title='Remove Agent' style='display:none'> <p style='position: absolute; top: 20px; width: 303px;'><span class='ui-icon ui-icon-alert' style='float: left; margin: 0 7px 20px 0;'></span>Do you really want to remove the agent..?</p</div></a>";
        }
        else {
            return "<img src='./images/removeGray.gif' title='Remove Agent'>";
        }
    }
    else {
        return "<a href='javascript:confirmDelete("+ rowObject.id +")' ><img src='./images/remove.gif' title='Remove Agent' ><div id='dialog-confirm' title='Remove Agent' style='display:none'> <p style='position: absolute; top: 20px; width: 303px;'><span class='ui-icon ui-icon-alert' style='float: left; margin: 0 7px 20px 0;'></span>Do you really want to remove the agent..?</p></div> </a>";
    }
}
function confirmDelete ( a ) {  
    $(function() {      
        $( "#dialog-confirm" ).dialog({
            resizable: false,
            height:140,
            modal: true,
            buttons: {
                "YES": function() {
                    $(this).load("./removeAgent.action?id="+a,  function() {
                        $("#agentResult").trigger("reloadGrid");
                    });
                    $(this).dialog("close");
                },
                "   NO    ": function() {
                    $(this).dialog("close");
                }
             }
        });
    });
}

帮我解决这个问题。

第7行语法错误

</p</div>

这将导致jQuery选择器失败