<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
.divClass{height:100%;width:100%;overflow:hidden;Margin-bottom:5px}
</style>
<title>COPY数据到ID群集中by ID | 图片CSS定义裁切显示| 文字的宽度自适应缩放</title>
</head>
<body >
<div id="a1" class="divClass"><img src="http://pic.bobay.cn/Files/automm/2005-12/28/05122821154187236.jpg"></div>
<div id="a2" >aa</div>
<div id="a3" >bb</div>
<div id="a4" >ccc</div>
<TABLE style="table-layout:fixed;border-collapse:collapse;font-size:12px;" border="1" width="200" bordercolor=#666666>
<TR>
<TD nowrap style="overflow:hidden;text-overflow:ellipsis;">内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容</TD>
</TR>
</TABLE>
<script language="javascript">
//by airzen 2006/02/16 QQ:39192170将需要源ID的HTML COPY到目标ID集合中;
var descIDs="a4,a2,a3";
var srcID="a1";
function FillData(descIDs,srcID){
Arr= descIDs.split(",");
var tmpSty = document.getElementById(srcID).className;
for (var i=0;i<Arr.length;i++){
document.getElementById(Arr[i]).innerHTML=document.getElementById(srcID).innerHTML;
document.getElementById(Arr[i]).className = tmpSty;
}
}
//run
FillData(descIDs,srcID);
</script>
</body>
</html>