代码编辑器:
x
1
<script>
2
function displayResult(){
3
var x=document.getElementById("hidden1").name;
4
alert(x);
5
}
6
</script>
7
<form>
8
<input type="hidden" id="hidden1" name="hidden1">
9
</form>
10
<button type="button" onclick="displayResult()">显示隐藏输入域的名称</button>
11