jQuery: not getting the value of a hidden input [closed]
I am having trouble getting the value of a hidden input. It seems so simple but I know I must be doing something wrong.
<html>
<head>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<title>Hidden Field Test</title>
<script type="text/javascript">
$(document).ready(function(){
var x = $('#test').val();
开发者_开发技巧 $('#results').append(x);
});
</script>
</head>
<body>
<form>
<input id="test" type="hidden" runat="server" vaule="false" />
<div id="results">
The value is:
<br />
</div>
</form>
</body
I also have it on jsfiddle.
Thanks for the help
vaule
-> value
精彩评论