0

我的尝试1:

var a=confirm('Do You Really want to Save this Record?') ;
document.getElementById('Hidden.ClientID') = a;

我的尝试2:

var a=confirm('Do You Really want to Save this Record?') ;
document.getElementById('Hidden.ClientID').value = a;

代码背后:

Response.Write(Hidden.Value);
Response.End();

///////// 为什么值没有存储在隐藏字段中?

4

2 回答 2

2

工作代码见

document.getElementById('<%=Hidden.ClientID%>').value="a";

    Code Behind :        
    Response.Write(Hidden.Value);
    Response.End();
于 2012-07-13T10:35:40.170 回答
2

尝试,

var ele=document.getElementById('<%=Hidden.ClientID%>');
ele.value=a;
于 2012-07-13T10:27:32.420 回答