javascript - The input element's type ('hidden') does not support selection

查看:250
本文介绍了javascript - The input element's type ('hidden') does not support selection的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

Uncaught DOMException: Failed to read the 'selectionStart' property from 'HTMLInputElement': The input element's type ('hidden') does not support selection.

不懂这是为什么导致的~有过来人帮忙解毒下吗?代码如下

    function eventUp(e){    
            layer(ctx);
        e.preventDefault();
        mousedown=false;
            setTimeout(function(){
            $.alert(awardsmsg, "msg", function() {
                $.ajax({
                    method: "POST",
                    url: "max.php",
                    data: {
                        unionid: unionid,
                        openid: openid,
                        nickname: nickname,
                        exchange: awardsexchange
                    },
                    success: function(){
                        wx.closeWindow();                                            
                    }
            });
            });    
            },456);
    }

解决方案

这个问题后来发现是我的值没传递下来。。。只要值传递下来了给值正确就不会有这个问题了

这篇关于javascript - The input element's type ('hidden') does not support selection的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆