Home >php教程 >php手册 >Tinymce+jQuery.Validation使用产生的BUG

Tinymce+jQuery.Validation使用产生的BUG

WBOY
WBOYOriginal
2016-06-01 09:46:53825browse

出错位置位于jquery.metadata.js的92行左右位置: 

<code class="language-javascript">else if ( elem.getAttribute != undefined ) { // 这行报错 
var attr = elem.getAttribute( settings.name ); 
if ( attr ) data = attr; 
} </code>

奇怪的是elem是textarea对象,但是竟然没有getAttribute这个方法 
解决:试着修改成以下代码,竟然成功了 

<code class="language-javascript">else { 
data = $(elem).attr(settings.name); 
} </code>

IE6 + Tinymce3.3 + jQuery.validation + jQuery.metadata 下出现问题 
Firefox没有问题,Tinymce编辑器simple主题没有问题。 
已经浪费1个小时了没时间研究。。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn