bootstrap input 加了 disabled 后台竟然接受不到值

下午做了一个input  值需要不可改变。在input属性中加入了  disabled 。在后台接受  var_dump($_POST);

 

竟然看不到值。

 

<input type="text" name="mainVer" id="mainVer" size="16" disabled style="width:200px"  class="form-control" value="{$mainVer}" style="cursor:not-allowe;" />

 

 

解决办法:[隐藏域]

 <input type="hidden" name="mainVer1" id="mainVer1" value="{$mainVer}"/>  

 

解决办法二:readonly

 

把disabled  改成 readonly="readonly"

 

文章来自:http://www.cnblogs.com/hgj123/p/4495252.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3