开发者

Applying css with out class name

开发者 https://www.devze.com 2023-01-21 11:23 出处:网络
I have a xml file with content <ul> <li&g开发者_开发问答t;<info>CSS text formatting </info></li>

I have a xml file with content

<ul>
   <li&g开发者_开发问答t;<info>CSS text formatting </info></li>
</ul>

Where info is a class name in css.When i parse the xml and displayed on a page the css class info is applying on the <li> tag.This is working in mozilla.But ie is not taking it as a css class.Is their any method to do in IE


The basic problem is that <info> is not HTML.

Firefox recovers by adding it to the DOM anyway, and you can persuade IE to do the same with document.createElement('info').

The correct solution, however, is to transform your XML source into HTML instead of just dropping it into the page.

0

精彩评论

暂无评论...
验证码 换一张
取 消