错误:SYNTAX_ERR:DOM异常12 [英] Error: SYNTAX_ERR: DOM Exception 12

查看:349
本文介绍了错误:SYNTAX_ERR:DOM异常12的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到错误'错误:SYNTAX_ERR:DOM异常12',代码如下:

I got the error 'Error: SYNTAX_ERR: DOM Exception 12' with this code:

var html = '<table><tr><td></td><td><input type="text" name="textArea" value="some text" /></td></tr></table>';
$(this.propertyContainer).html(html)

NOT 使用此代码:

$(this.propertyContainer).html('<table><tr><td></td><td><input type="text" name="textArea" value="some text" /></td></tr></table>')

这是propertyContainer的html:

Here is the html of propertyContainer:

<div xmlns="http://www.w3.org/1999/xhtml" class="property-grid" style="position: absolute; top: 35px; left: 0px;" id="ext-gen126"></div>

你有什么想法吗?

推荐答案

我找到了。我在输入标签的末尾忘记了字符'/'...

I found it. I forgot the character '/' at the end of the input tag...

我想这是因为dtd:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus SVG 1.1//EN"
"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"
>

对不起...

这篇关于错误:SYNTAX_ERR:DOM异常12的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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