问题说明:在firefox上面下放后点击回收的时候不会出现闪动的现象,但是360和ie会出现闪动的现象,本人限于自身能力无法无法解决,求各位高手不吝赐教javascript部分
$(document).ready(
function(){
$("#show").click(
function(){
$("#website").show(1000);
}
);

$("#hide").click(
function(){
$("#website").hide(1000);
}
);
$("#showNhide").click(
function(){
$("#showTable").slideToggle(1000);
}
); }
); function jsonIterator(json , colNames,elementById){


var str = "<table border=1 bgcolor=orange>";
str += colNames;
for(var key in json){
str += "<tr>";
for(var value in json[key]){
str += "<td>";
str += json[key][value];
str += "</td>";
}
str +="</tr>"

}
//document.write(str+"</table>");
//document.getElementById("#test").innerHTML = str + "</table>";注意与jquery的用法区别"#test"(jquery),'test'(javascript)
document.getElementById(elementById.id).innerHTML = str + "</table>";
}

function showJson(elementById){
var json = [{"key1" : "value1","key2" : "value2","key3" : "value3"},{"key1" : "valueA", "key2" : "valueB", "key3" : "valueC"}]; var colNames = "<tr><td>key1</td><td>key2</td><td>key3</td></tr>";

jsonIterator(json,colNames,elementById);
}
以下是html部分:
<p>this is a toggle test!!!</p>
<p id="showNhide">click here</p>
<div id="showTable">
<a href="#" onclick="showJson(document.getElementById('showTable'))" >show json to table</a>
</div>