选择性操用功能
function MessageConfirm() {
var info;
var cancels;
info = window.confirm('是否进行完结审批?');
if (info == true) {
window.navigate("ApprovalEnd.aspx?StatusID=2&id=" + document.getElementById('<%=hfdID.ClientID%>').value);
} else if (info == false) {
cancels = window.confirm('是否进行归档关闭?');
if (cancels == true) {
document.getElementById('<%=but_Complete.ClientID %>').click();
// window.navigate("WorkMy.aspx?id=" + "2");
}
}
}
///----------------------------------------------------------------
<div style="display:none">
<asp:Button ID="but_Complete" runat="server" Text="工作完成" Height="20px"
OnClick="but_Complete_Click" OnClientClick="return confirm('确认工作完成!')" />
</div>
<input id="btnShowDiv" onclick="MessageConfirm()" style="height:20px;"
type="button" value="工作完成" onclick="return btnShowDiv_onclick()" onclick="return btnShowDiv_onclick()" /></td>