这就是我调用 iframe 并传递数据的方式
<script type="text/javascript">
function refreshConversatio() {
document.getElementById('iframeDisplayMessage').src = 'Message.aspx?id=' + document.getElementById('val').value;
}
</script>
这就是我获得价值的方式,但是我如何通过 Hiddenfield 获得价值?
<script type="text/javascript">
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
function myLoad() {
document.getElementById('divConversation').innerText = getParameterByName("id");
}
</script>
</head>
<body style="background-color:#a32c05;" >
<input type="hidden" runat="server" id="hidden1" name="hidden1" />
<div id="divConversation"></div>
<script>
myLoad();
</script>
</body>