求可拖动列宽的表格JS http://www.9499.net/?go=tc最近上不去,这个地址能下:http://www.ebugd.com/taynniblog/article.asp?id=81 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我这个行吗?<script language="javascript">var colnum=0; var begin_x;var begin_y; var drag_flag = false; document.onmousedown = mouseDragBegindocument.onmousemove = mouseDragdocument.onmouseup = mouseDragEnd function setDrag(col){drag_flag = true; colnum = col;} function mouseDragBegin(){if(drag_flag==true){begin_x = event.x;begin_y = event.y;}}function mouseDrag(){if(drag_flag==true){if (window.event.button == 1){var now_x = event.x;var now_y = event.y;if(colnum==0){var value = ColRight1[0].style.pixelWidth + now_x - begin_x; for(var i=0;i<ColRight1.length;i++){ColRight1[i].style.pixelWidth = value; } if (ColRight1[0].style.pixelWidth <=10){for (var i=0;i<ColRight1.length;i++){ColRight1[i].style.pixelWidth = 10;} } begin_x = now_x;}else if(colnum==1){var value = ColRight2[0].style.pixelWidth + now_x - begin_x; for(var i=0;i<ColRight1.length;i++){ColRight2[i].style.pixelWidth = value; } if (ColRight2[0].style.pixelWidth <=10){for (var i=0;i<ColRight2.length;i++){ColRight2[i].style.pixelWidth = 10;} } begin_x = now_x; }else if(colnum==2){var value = ColRight3[0].style.pixelWidth + now_x - begin_x;for(var i=0;i<ColRight1.length;i++){ColRight3[i].style.pixelWidth = value;}if (ColRight3[0].style.pixelWidth <=10){for (var i=0;i<ColRight3.length;i++){ColRight3[i].style.pixelWidth = 10;}} begin_x = now_x;}else if(colnum==3){var value = ColRight4[0].style.pixelWidth + now_x - begin_x;for(var i=0;i<ColRight1.length;i++){ColRight4[i].style.pixelWidth = value;}if (ColRight4[0].style.pixelWidth <=10){for (var i=0;i<ColRight4.length;i++){ColRight4[i].style.pixelWidth = 10;}} begin_x = now_x;} }} }function mouseDragEnd(){drag_flag=false;} //--></script> <TABLE ID="tblTitle" BORDER=0 cellspacing =0 cellpadding =0 STYLE="border-collapse:collapse;"> <tr height = 30> <td class="tdTitle"><DIV ID=ColRight1 style="width:100px; background-color:red" unselectable="on" onMouseDown="setDrag(0)">000</DIV></td> <td class="tdTitle"><DIV ID=ColRight2 style="width:100px; background-color:green" unselectable="on" onMouseDown="setDrag(1)">111</DIV></td> <td class="tdTitle"><DIV ID=ColRight3 style="width:120px; background-color:red" unselectable="on" onMouseDown="setDrag(2)">222</DIV></td> <td class="tdTitle"><DIV ID=ColRight4 style="width: 50px; background-color:green" unselectable="on" onMouseDown="setDrag(3)">333</DIV></td> </tr> <tr height = 30> <td class="tdTitle"><DIV ID=ColRight1 style="width:100px; background-color:red" unselectable="on" onMouseDown="setDrag(0)">000</DIV></td> <td class="tdTitle"><DIV ID=ColRight2 style="width:100px; background-color:green" unselectable="on" onMouseDown="setDrag(1)">111</DIV></td> <td class="tdTitle"><DIV ID=ColRight3 style="width:120px; background-color:red" unselectable="on" onMouseDown="setDrag(2)">222</DIV></td> <td class="tdTitle"><DIV ID=ColRight4 style="width: 50px; background-color:green" unselectable="on" onMouseDown="setDrag(3)">333</DIV></td> </tr> </TABLE> 求个程序,动态显示几十个图片 提取页面代码,please enter... 用JS如何实现让鼠标的焦点跟在文本之后 如何把自己删了? 高手帮忙看一下这个JS问题 简单问题,高手请进 高分请教画线问题 菜鸟求教,下面这个页面错在哪里阿??想实现用一个函数使本页面跳到另一个页面 怎样用链接直接打开exe文件,而不出现下载窗口?再线等待...... 当鼠标移到某一行上时显示该行的提示信息怎么实现? 求AJAX JS包 100分求 怎么给一行表格鼠标点上的时候出现选中状态,双击再打开相关数据
<script language="javascript">var colnum=0;
var begin_x;
var begin_y;
var drag_flag = false;
document.onmousedown = mouseDragBegin
document.onmousemove = mouseDrag
document.onmouseup = mouseDragEnd
function setDrag(col){
drag_flag = true;
colnum = col;
}
function mouseDragBegin(){
if(drag_flag==true){
begin_x = event.x;
begin_y = event.y;
}
}function mouseDrag(){
if(drag_flag==true){
if (window.event.button == 1){
var now_x = event.x;
var now_y = event.y;
if(colnum==0){
var value = ColRight1[0].style.pixelWidth + now_x - begin_x;
for(var i=0;i<ColRight1.length;i++){
ColRight1[i].style.pixelWidth = value;
}
if (ColRight1[0].style.pixelWidth <=10){
for (var i=0;i<ColRight1.length;i++){
ColRight1[i].style.pixelWidth = 10;
}
}
begin_x = now_x;}else if(colnum==1){
var value = ColRight2[0].style.pixelWidth + now_x - begin_x;
for(var i=0;i<ColRight1.length;i++){
ColRight2[i].style.pixelWidth = value;
}
if (ColRight2[0].style.pixelWidth <=10){
for (var i=0;i<ColRight2.length;i++){
ColRight2[i].style.pixelWidth = 10;
}
}
begin_x = now_x;
}else if(colnum==2){
var value = ColRight3[0].style.pixelWidth + now_x - begin_x;
for(var i=0;i<ColRight1.length;i++){
ColRight3[i].style.pixelWidth = value;
}
if (ColRight3[0].style.pixelWidth <=10){
for (var i=0;i<ColRight3.length;i++){
ColRight3[i].style.pixelWidth = 10;
}
}
begin_x = now_x;}else if(colnum==3){
var value = ColRight4[0].style.pixelWidth + now_x - begin_x;
for(var i=0;i<ColRight1.length;i++){
ColRight4[i].style.pixelWidth = value;
}
if (ColRight4[0].style.pixelWidth <=10){
for (var i=0;i<ColRight4.length;i++){
ColRight4[i].style.pixelWidth = 10;
}
}
begin_x = now_x;}
}
}
}
function mouseDragEnd(){
drag_flag=false;
}
//-->
</script> <TABLE ID="tblTitle" BORDER=0 cellspacing =0 cellpadding =0 STYLE="border-collapse:collapse;">
<tr height = 30>
<td class="tdTitle"><DIV ID=ColRight1 style="width:100px; background-color:red" unselectable="on" onMouseDown="setDrag(0)">000</DIV></td>
<td class="tdTitle"><DIV ID=ColRight2 style="width:100px; background-color:green" unselectable="on" onMouseDown="setDrag(1)">111</DIV></td>
<td class="tdTitle"><DIV ID=ColRight3 style="width:120px; background-color:red" unselectable="on" onMouseDown="setDrag(2)">222</DIV></td>
<td class="tdTitle"><DIV ID=ColRight4 style="width: 50px; background-color:green" unselectable="on" onMouseDown="setDrag(3)">333</DIV></td>
</tr>
<tr height = 30>
<td class="tdTitle"><DIV ID=ColRight1 style="width:100px; background-color:red" unselectable="on" onMouseDown="setDrag(0)">000</DIV></td>
<td class="tdTitle"><DIV ID=ColRight2 style="width:100px; background-color:green" unselectable="on" onMouseDown="setDrag(1)">111</DIV></td>
<td class="tdTitle"><DIV ID=ColRight3 style="width:120px; background-color:red" unselectable="on" onMouseDown="setDrag(2)">222</DIV></td>
<td class="tdTitle"><DIV ID=ColRight4 style="width: 50px; background-color:green" unselectable="on" onMouseDown="setDrag(3)">333</DIV></td>
</tr>
</TABLE>