满意请采纳
怎样让HTML 表格中内容自动换行??
<table class="page_speeder_1656673899">
如何改变图片的大小?大神们帮帮忙<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "><html xmlns=">
<head>
<style type='text/css'>
body{
width:140px
height:200px
margin:160px auto
}
</style>
</head>
<body>
<div>
<div style="overflow:autoheight:209pxwidth:140pxposition:relativeborder-bottom:1px solid #333" id="tb">
<table border="1" id="tbl"$amp>amp$lttr$amp>amp$lttd colspan=2 style="width:114px">sdfsdfdf</td$amp>amp$lt/tr$amp>amp$lttr$amp>amp$lttd>sdfsdfs1</td$amp>amp$lttd$amp>amp$ltimg src='images/close.gif' /$amp>amp$lt/td$amp>amp$lt/tr$amp>amp$lttr$amp>amp$lttd>sdfsdfs2</td$amp>amp$lttd$amp>amp$ltimg src='images/close.gif' /$amp>amp$lt/td$amp>amp$lt/tr$amp>amp$lttr$amp>amp$lttd>sdfsdfs3</td$amp>amp$lttd$amp>amp$ltimg src='images/close.gif' /$amp>amp$lt/td$amp>amp$lt/tr$amp>amp$lttr$amp>amp$lttd>sdfsdfs4</td$amp>amp$lttd$amp>amp$ltimg src='images/close.gif' /$amp>amp$lt/td$amp>amp$lt/tr$amp>amp$lttr$amp>amp$lttd>sdfsdfs5</td$amp>amp$lttd$amp>amp$ltimg src='images/close.gif' /$amp>amp$lt/td$amp>amp$lt/tr$amp>amp$lttr$amp>amp$lttd>sdfsdfs6</td$amp>amp$lttd$amp>amp$ltimg src='images/close.gif' /$amp>amp$lt/td$amp>amp$lt/tr$amp>amp$lttr$amp>amp$lttd>sdfsdfs7</td$amp>amp$lttd$amp>amp$ltimg src='images/close.gif' /$amp>amp$lt/td$amp>amp$lt/tr$amp>amp$lttr$amp>amp$lttd>sdfsdfs8</td$amp>amp$lttd$amp>amp$ltimg src='images/close.gif' /$amp>amp$lt/td$amp>amp$lt/tr$amp>amp$lttr$amp>amp$lttd>sdfsdfs9</td$amp>amp$lttd$amp>amp$ltimg src='images/close.gif' /$amp>amp$lt/td$amp>amp$lt/tr$amp>amp$lttr$amp>amp$lttd>sdfsdf10</td$amp>amp$lttd$amp>amp$ltimg src='images/close.gif' /$amp>amp$lt/td$amp>amp$lt/tr$amp>amp$lttr$amp>amp$lttd>sdfsdf11</td$amp>amp$lttd$amp>amp$ltimg src='images/close.gif' /$amp>amp$lt/td$amp>amp$lt/tr$amp>amp$lttr$amp>amp$lttd>sdfsdf12</td$amp>amp$lttd$amp>amp$ltimg src='images/close.gif' /$amp>amp$lt/td$amp>amp$lt/tr$amp>amp$lt/table>
</div>
<table border="1" id="aaa" style="position:absolutetop:160pxbackground:#ffffff"$amp>amp$lttr$amp>amp$lttd colspan=2 style="width:114px">sdfsdfdf</td$amp>amp$lt/tr$amp>amp$lt/table>
</div>
</body>
</html>
<script type='text/javascript'>
onload = init
function init(){
var imgs = document.getElementById("tb").getElementsByTagName("img")
for(var i=0i<imgs.lengthi++){
imgs[i].onclick = changeSp
}
}
function changeSp(){
if(this.flg){
this.flg = false
this.src = "images/close.gif"
}else{
this.flg = true
this.src = "images/open.gif"
}
var imgs = document.getElementById("tb").getElementsByTagName("img")
for(var i=0i<imgs.lengthi++){
if(!imgs[i].flg){
document.getElementById("tbl").tBodies[0].insertBefore(this.parentNode.parentNode, imgs[i].parentNode.parentNode)
break
}
imgs[i].onclick = changeSp
}
updataSld()
}
function updataSld(){
var imgs = document.getElementById("tb").getElementsByTagName("img")
document.getElementById("aaa").tBodies[0].innerText document.getElementById("aaa").tBodies[0].innerText= "" :document.getElementById("aaa").tBodies[0].innerHTML =""
var tr0 = document.getElementById("tbl").tBodies[0].rows[0].cloneNode(true)
tr0.style.background = "#ffffff"
document.getElementById("aaa").tBodies[0].appendChild(tr0)
for(var i=0i<imgs.lengthi++){
if(imgs[i].flg){
var a = imgs[i].parentNode.parentNode.cloneNode(true)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)