Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename,...
来源:互联网 发布:大烟雾做丝数据 编辑:程序博客网 时间:2024/04/29 20:17
错误信息:
Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename, which may only be programmatically set to the empty string.
我的代码如下:
//编辑 function modify(id){ $.ajax({ url:"@{communityControllers.ClubManageAction.edit()}", type:"POST", data:{id:id}, dataType:"json", error: function(XMLHttpRequest, textStatus, errorThrown) { layer.alert("网络错误"); }, success: function(data) { $("#club_name").val(data.name); $('#addUpdateMode').modal('toggle'); } }) }
报这个错误的地方是在:success方法里面;
这里不能直接进行赋值:
$("#club_name").val(data.name); //error
正确的做法是:
success: function(data) { var name = data.name;//先赋值给一个变量 $("#club_name").val(name);//ok $('#addUpdateMode').modal('toggle'); }
0 0
- Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename,...
- Failed to set the 'value' property on 'HTMLInputElement': This input element解决办法
- Uncaught SyntaxError: Failed to set the 'innerHTML' property on 'Element'
- Uncaught InvalidStateError: Failed to read the 'selectionDirection' property from 'HTMLInputElement'
- could not be set to a 'string' value. You must set this property to a non-null value of type
- Creating the Value Set for a DropDownByKey Element
- IAR调试出现the stack plug-in failed to set a breakpoint on "main"
- 在IAR 中出现the stack plug-in failed to set a breakpoint on "main"
- How to set a badge value on a UITabBarController item
- IAR调试cc2540 时 出现The stack plug-in failed to set a breakpoint on "main". 解决方法
- A value is trying to be set on a copy of a slice from a DataFrame
- How to set a breakpoint on a property within a third-party managed component?
- Failed to set () user defined inspected property on (UIButton): [<UIButton 0x7fe5586efeb0> setValue:
- Failed to set (keyPath) user defined inspected property on (UIView): [<UIView 0x7994f790> setValue:f
- iOS-Failed to set (placeholder) user defined inspected property on (UITextView)
- svn : how to set the executable bit on a file?
- use a data or computed property based on the prop's value.
- Ext submit时报错 Failed to execute 'appendChild' on 'Node': The new child element is null.
- Docker整理之docker命令(六)
- jquery监听div内容(元素)的变化具体实现思路
- POJ1061 青蛙的约会
- UE4中Lambda的一些用法
- cocos lua 的一些例子
- Failed to set the 'value' property on 'HTMLInputElement': This input element accepts a filename,...
- mysql数据库MyISAM和InnoDB两个存储引擎的索引实现方式
- mysql(六):mysql视图
- Unity3D引擎摄像机视图与场景视图一致 Camera View And Scene View By Align View
- Codeforces Round #376 (Div. 2) D 模拟+线段树区间维护
- js生成验证码并验证
- C#中数组、ArrayList和List三者的区别
- 数组指针和指针数组的区别
- combobox下拉框默认选择了第一值——easyUI