Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/74.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html5数字可以';t使用jQuery提取值_Jquery_Html - Fatal编程技术网

Html5数字可以';t使用jQuery提取值

Html5数字可以';t使用jQuery提取值,jquery,html,Jquery,Html,我有一些HTML代码: <div class="row"> <label class="span3" for="WidgetWidthProduct">Widget width</label> <input type="number" class="span1" min="2" max="12" id="WidgetWidthProduct" value="3" /> </div> 有什么帮助吗?

我有一些HTML代码:

    <div class="row">
     <label class="span3" for="WidgetWidthProduct">Widget width</label>
     <input type="number" class="span1" min="2" max="12" id="WidgetWidthProduct" value="3" />
    </div>
有什么帮助吗? Thx您是否包装了
警报($(“#WidgetWidthProduct”).val()文档内部准备好了吗

这个很好用

 $(function () {
    alert($("#WidgetWidthProduct").val());
 });

您的代码是否在加载页面后运行?确定重复元素id

是否在
$(文档)中使用该元素。就绪(函数(){…})对我来说很好:也许你需要展示更多的代码。重复的元素id是罪魁祸首
 $(function () {
    alert($("#WidgetWidthProduct").val());
 });