C#.netGrideView中弹窗,EasyUI兼容IE8 [操作系统入门]
一开始这个功能在谷歌上实现了,但是最后在IE中怎么也不好使,最后发现是Jquery 的问题,不能用jQuery取z值,只能用纯JS 进行 页面值的获取。最后成功实现功能。这是写给我自己的记录。别人可能看不懂我这shit一样的代码。
JS==================
function Time_submitForm() {
// var Time_submitForm = function(){
var Time_dlg = document.getElementById("Time_dlg");
Time_dlg.setAttribute("onclick", "");
var FirstHalf_TaskPoints = document.getElementById("txtrenwu").value;//任务
var FirstHalf_AddPoints = document.getElementById("txtzhuijia").value;//追加
var FirstHalf_ServicePoints = document.getElementById("txtfuwu").value;//服务
//var hidReceiver = $("#Receiver").html().trim();//工号
var hidReceiver = document.getElementById("Receiver").innerHTML;//工号
var WorkNum = document.getElementById("WorkNum").innerHTML;//工作领号
// var hidReceiver = $("#Receiver").val();//工号
// var WorkNum = $("#WorkNum").html().trim();//工作领号
var Allocation_TaskId = document.getElementById("Allocation_TaskId").innerHTML;//外键ID
//var Allocation_TaskId = $("#Allocation_TaskId").html().trim();//外键ID
var LegalleaveDate = $(‘#txtLegalleaveDate‘).datebox(‘getValue‘);//国假日日期
var isChecked = $(‘#rblLegalleaveType‘).is(":checked");
if (isChecked) {
var LegalleaveType = ‘1‘;
} else {
var LegalleaveType = ‘0‘;
}
$.post("/TaskPoints/TanShang/HCPoint.ashx?type=1&FirstHalf_TaskPoints=" + FirstHalf_TaskPoints + "&FirstHalf_AddPoints=" +
FirstHalf_AddPoints + "&FirstHalf_ServicePoints=" + FirstHalf_ServicePoints + "&LegalleaveDate=" + LegalleaveDate +
"&LegalleaveType=" + LegalleaveType + "&Receiver=" + hidReceiver + "&WorkNum=" + WorkNum + "&Allocation_TaskId=" + Allocation_TaskId,
function (result) {
if (result) {
$(‘#Time_dlg‘).dialog(‘close‘);
document.getElementById("<%=btnSearch.ClientID%>").click();
alert("修改积点成功!");
}
});
};
前端==================
<asp:TemplateField HeaderText="积点操作" SortExpression="DepComDate" Visible="false">
<ItemTemplate>
<asp:Literal ID="PoiAdd" runat="server" ></asp:Literal>
</ItemTemplate>
<ControlStyle CssClass="buttonText" Width="30px"></ControlStyle>
</asp:TemplateField>
后端================
写在 protected void gridView_RowDataBound(object sender, GridViewRowEventArgs e)
{ } 这个方法里面
Literal PoiAdd = e.Row.FindControl("PoiAdd") as Literal;
PoiAdd.Text = "<a href=javascript:void(0) style=‘color:Blue;TEXT-DECORATION:underline‘ onclick=‘javascript:ShowDlgTime("" + Receiver + "","" + WorkNum + "","" + Allocation_TaskId + "")‘>添加</a>";
C# .net GrideView 中 弹窗,Easy UI 兼容 IE 8
以上是 C#.netGrideView中弹窗,EasyUI兼容IE8 [操作系统入门] 的全部内容, 来源链接: utcz.com/z/519117.html