php – TypeError:Value未实现接口HTMLInputElement

发布时间:2022-04-30 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了php – TypeError:Value未实现接口HTMLInputElement脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图使用jquery-ajax发布表单,并且我在点击时发布表单时收到此错误.
    TyPEError:Value未实现接口 HTMLInputElement
这是我的 JavaScript代码

$('document').ready(function () {
    $('#update').click(function () {
        jQuery.post("update_category",{
            c_id: c_id,c_name: c_name,c_description: c_description
        },function (data,textstatus) {
            if (data == 1) {
                $('#response').htML("Thank You!!..We Will Get Back To You Soon..!!");
                $('#response').css('color','green');
            } else {
                $('#response').html("Some Error Occurred");
                $('#response').css('color','red');
            }
        });
    });
});

我的表格:

<div id="form">
    <form>
    <!-- PRONT DROP DOWN HERE !-->
        <input type="text" name="c_id" id="c_id" disabled="disble" placeholder="'.strtoupper($r['c_id']).'" value="'.strtoupper($r['c_id']).'" ></input>
        <input type="text" name="c_name" id="c_name" disabled="disble" placeholder="'.strtoupper($r['c_name']).'" value="'.strtoupper($r['c_name']).'"></input>
        <textarea rows="4" class="field span10" name="c_description" id="c_description"  disabled="disble" placeholder="Description">'.strtoupper($r['c_description']).'</textarea>

    </form> 
</div>

解决方法

如果在ajax请求中发送jquery对象,则可以生成错误. 因此,在您的情况下,c_id,c_name或c_description中的一个可能是表示输入字段的jQuery对象,而不是输入元素的.val()值.

脚本宝典总结

以上是脚本宝典为你收集整理的php – TypeError:Value未实现接口HTMLInputElement全部内容,希望文章能够帮你解决php – TypeError:Value未实现接口HTMLInputElement所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。