我的网站上有一个严重的问题.在Google Chrome中,有些客户无法前往我的付款页面.在尝试提交表单时,我收到此错误:
An invalid form control with name='' is not focusable.
Run Code Online (Sandbox Code Playgroud)
这是来自JavaScript控制台.
我读到问题可能是由于隐藏字段具有必需属性.现在的问题是我们使用的是.net webforms必需的字段验证器,而不是html5必需属性.
这个错误似乎是随机的.有没有人知道解决方案?
我想在应用 TinyMCE 时强制提交文本区域。
如果我给 加上required
属性<textarea>
,会导致即使填了也无法提交!
我怎么解决这个问题?
tinymce.init({
selector: '#summaryId',
max_chars: 255, // max. allowed chars
plugins: "paste",
setup: function (ed) {
var allowedKeys = [8, 37, 38, 39, 40, 46]; // backspace, delete and cursor keys
ed.on('keydown', function (e) {
if (allowedKeys.indexOf(e.keyCode) != -1) return true;
if (tinymce_getContentLength() + 1 > this.settings.max_chars) {
e.preventDefault();
e.stopPropagation();
return false;
}
return true;
});
ed.on('keyup', function (e) {
tinymce_updateCharCounter(this, tinymce_getContentLength());
});
},
init_instance_callback: function () { // initialize counter …
Run Code Online (Sandbox Code Playgroud)