c#中如何将后台数据传入js弹出框中
弹出框的值是从数据库中查询出来的,我做修改后在保存到数据库中functioneditQuestion(){varhtmlContent='<br/><tablealign...
弹出框的值是从数据库中查询出来的,我做修改后在保存到数据库中
function editQuestion(){
var htmlContent = '<br/><table align=center>'
+'<tr><td>问题</td><td>'
+'<input type="text" id="txtQuestion"/> <font color="red">*<font>'
+'</td></tr><tr><td>答案</td>'
+'<td><textarea id="txtAnswer" cols="19" rows="10"></textarea> <font color="red">*<font></td></tr></table>'
var dg = new $.dialog(
{
id:'edit',
title:'修改',
height:300,
html:htmlContent,
dgOnLoad:function(){
dg.addBtn('BtnSave','确定',function(){
document.getElementById("HiddenQuestion").value=document.getElementById("txtQuestion").value;
document.getElementById("HiddenAnswer").value=document.getElementById("txtAnswer").value;
//document.getElementById("editBtn").onclick;
alert("修改成功!");
// dg.CloseDialog();
},'left');
}
}
);这样写的,怎么获取呢 展开
function editQuestion(){
var htmlContent = '<br/><table align=center>'
+'<tr><td>问题</td><td>'
+'<input type="text" id="txtQuestion"/> <font color="red">*<font>'
+'</td></tr><tr><td>答案</td>'
+'<td><textarea id="txtAnswer" cols="19" rows="10"></textarea> <font color="red">*<font></td></tr></table>'
var dg = new $.dialog(
{
id:'edit',
title:'修改',
height:300,
html:htmlContent,
dgOnLoad:function(){
dg.addBtn('BtnSave','确定',function(){
document.getElementById("HiddenQuestion").value=document.getElementById("txtQuestion").value;
document.getElementById("HiddenAnswer").value=document.getElementById("txtAnswer").value;
//document.getElementById("editBtn").onclick;
alert("修改成功!");
// dg.CloseDialog();
},'left');
}
}
);这样写的,怎么获取呢 展开
7个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询