开发者

jQuery: not getting the value of a hidden input [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 10 years ago.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜