<script>
show_demo=function(){
var body = document.getElementById('show_tab');
alert("d");
//data是ajax从后台拿到的数据
/* for(var property in data) {
var newRow = body.insertRow(j);
newRow.align="center";
newRow.id="newPropRow"+j;
document.getElementById("newPropRow"+j).setAttribute("className","wordhei");
var p = newRow.insertCell(0);
p.width="25%";
p.innerHTML=property;
var v = newRow.insertCell(1);
v.width="75%";
v.style.wordBreak="break-all";//超过td宽度自动换行
v.innerHTML=" "+data[property];
}*/
var newRow = body.insertRow();
newRow.align="center";
newRow.id="newPropRow";
// document.getElementById("newPropRow"+j).setAttribute("className","wordhei");
var p = newRow.insertCell(0);
p.width="25%";
p.innerHTML="我爱你";
var v = newRow.insertCell(1);
v.width="75%";
v.style.wordBreak="break-all";//超过td宽度自动换行
v.innerHTML=" "+"宝贝,亲爱的宝贝,我爱你,宝贝,你好啊!宝贝,亲爱的宝贝,我爱你,宝贝,你好啊!宝贝,亲爱的宝贝,我爱你,宝贝,你好啊!";
}
</script>
</HEAD>
<BODY onload="show_demo();">
<div style="OVERFLOW-Y:auto;width:200px;height:100px;position: absolute;left:25px" id="show_div_id">
<table width="100%" border="1" align="center" style="table- layout:fixed;word-wrap:break-word;word-break;break-all" cellpadding="2" cellspacing="0" bgcolor="#e5f0f2" id="show_tab" >
</table>
</div>