transformiix:result
我怎样才能在firefox中删除它。它正在影响我的javascript。我试着在周围工作,但它不再工作了
解决方法
if($('body').length == 0){
var head = $("#top_section")
var $set = $( document ).children();
$set = $set.children();
for(var i=1, len = $set.length; i < len; i +=5){
$set.slice(i, i+6).wrapAll('<body />');
}
}
使现代化
xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/xslt/user_services_owners.xsl"?>
<response>
<header>
<error>false</error>
<message>success</message>
<api_status>1</api_status>
<api_response>success</api_response>
<http_status>200</http_status>
<http_response>ok</http_response>
<format>xml</format>
<csrf>946dc689cae6c5d0ae3fcf01de951493</csrf>
<token>946dc689cae6c5d0ae3fcf01de951493</token>
<user>UddinS2</user>
<title>Manage Service, Project, Programme</title>
<description>List, add, edit, and remove services, projects and programmes</description>
<nav>
<container>
<title>Users</title>
<link>#</link>
<theme>#007c92</theme>
<sub_modules>
<title>Getting Started</title>
<link>#</link>
<theme>#007c92</theme>
<menuitem>
<title>File - CM Template v6.3</title>
<link>/library/templates/FW-LB-CommsMatrix-Template-v6.3.xls</link>
</menuitem>
<menuitem>
<title>Sudo Group Access</title>
<link>/sudo_group_access.php?csrf=946dc689cae6c5d0ae3fcf01de951493</link>
</menuitem>
</sub_modules>
</container>
</nav>
<server>1</server>
<version>5.1</version>
</header>
<body>
<recordset>
<record>
<ID>121</ID>
<SERVICE_ID>201</SERVICE_ID>
<NAME>UddinS2</NAME>
<TYPE>owner</TYPE>
<SERVICE>* Ad-hoc Submission</SERVICE>
</record>
<metadata>
<num_rows>1</num_rows>
</metadata>
</recordset>
</body>
</response>
/xslt/user\u services\u owners.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="header.xsl" />
<xsl:output method="html" indent="yes" encoding="iso-8859-1" media-type="html" doctype-public="-//W3C//DTD HTML 4.0//EN" />
<xsl:template match="body">
<div id="page-content-wrapper">
<div class="container-fluid">
</div>
</div>
<xsl:apply-templates select="footer" />
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="header">
<HEAD>
</HEAD>
<div class="container-fluid" id="top_section">
</div>
<div id="sidebar-wrapper" class="hidden-print">
</div>
<div id="myModalError" class="modal fade" role="dialog">
</div>
</xsl:template>
<xsl:template name="footer">
<FOOTER>
</FOOTER>
</xsl:template>
</xsl:stylesheet>
在firefox中,我在使用我的解决方案后看到了以下代码。
<transformiix:result><head>....</head><body>....</body></transformiix:result>
我正在使用php生成我放在上面的xml,并将其发送到浏览器。浏览器翻译样式表,并触发解决方法
document.ready
仅在firefox中,它将div放置在body标签内的正确位置。没有它,就没有身体标签。问题是:jquery无法定位body,因为它在firefox中是用transformiix封装的