本文介绍了为什么我的网站没有出现在Internet Explorer中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经创建了一个 thead
(header)的表;在Mac上,在Firefox中,一切都很好,但是在Internet Explorer 6上,头只是走了...
I have made a table with a thead
(header); on a Mac, and in Firefox everything is fine, but on Internet Explorer 6 the head is just gone...
任何想法为什么?
以下是测试它的链接: ...该表格在 tablerize.js
中构建:
Here is the link to test it: http://www.acecrodeo.com/new/05-rodeos.php... The table is constructed in tablerize.js
:
jQuery.fn.tablerize = function() {
return this.each(function() {
var table;
$(this).find('li').each(function(i) {
var values = $(this).html().split('*');
if(i == 0) {
table = $('<table>');
var thead = $('<thead>');
$.each(values, function(y) {
thead.append($('<th>').html(values[y]));
});
table.append(thead);
} else {
var tr = $('<tr>');
$.each(values, function(y) {
tr.append($('<td>').html(values[y]));
});
table.append(tr);
}
});
$(this).after(table).remove();
});
};
...从页面上的列表:
...from a list on the page:
<ul>
<li> Date*Endroit*Sanction</li>
<li> 29 Mars & 5 Avril*St-Évariste, Beauce # 1*Équipe Rodéo du Qc.</li>
<li> 12 & 19 Avril*St-Évariste, Beauce # 2*Équipe Rodéo du Qc.</li>
<!-- ... -->
</ul>
推荐答案
好吧,因为我是tablerize的作者以及修复它。
Well since I'm the author of tablerize I might as well fix it.
jQuery.fn.tablerize = function() {
return this.each(function() {
var table = $('<table>');
var tbody = $('<tbody>');
$(this).find('li').each(function(i) {
var values = $(this).html().split('*');
if(i == 0) {
var thead = $('<thead>');
var tr = $('<tr>');
$.each(values, function(y) {
tr.append($('<th>').html(values[y]));
});
table.append(thead.append(tr));
} else {
var tr = $('<tr>');
$.each(values, function(y) {
tr.append($('<td>').html(values[y]));
});
tbody.append(tr);
}
});
$(this).after(table.append(tbody)).remove();
});
};
应该这样做。
这篇关于为什么我的网站没有出现在Internet Explorer中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!