单元格拖拽的问题 when I passed Just Up it 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 td里面是不能直接实现这样的功能的,不妨利用下其他控件,比如TEXT框<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>test</title><style>.input{ border-style:none; border-bottom-color:#FFFFFF; border-left-color:#FFFFFF; border-top-color:#FFFFFF; border-right-color:#FFFFFF; height:100%; width:100%;}</style></head><body><table border=1 cellpadding="0" cellspacing="0" width="300"><tr> <td> <input class=input type=text onkeypress="return false" value="aaa"> </td> <td> <input class=input type=text onkeypress="return false" value="bbb"> </td> <td> <input class=input type=text onkeypress="return false" value="ccc"> </td> </tr></table></body></html> 我觉得TD应该可以实现这样的功能,不过我只做过Table的拖拽选择,没做过选择之后的字符移动。 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> new document </title> <meta name="generator" content="editplus" /> <meta name="author" content="" /> <meta name="keywords" content="" /> <meta name="description" content="" /> </head> <body><table cellspacing="2" cellpadding="20" border=1 ><tr> <td> 『公告』无忧脚本论坛关闭新会员注册 </td> <td> javascript标准文档以及其他标准文档 Ł 2 3 4 </td> <td> 本版发帖规则及精华帖、Javascript 参考手册(重新整理中) </td></tr> </table> </body> <script type="text/javascript">$={},$$=document;$$.onmousedown=function (){ $.src=event.srcElement; $.drag=true;}$$.onmouseup=function (){ $.drag=false; if($.over&&($.over!=$.src)){ $.over.innerHTML+=$$.selection.createRange().htmlText; } if($.tmp){ $.tmp.style.visibility='hidden'; }}$$.onmousemove=function (){ if($.drag&&$$.selection.createRange().htmlText!=''){ if(!$.tmp){ var info=document.createElement('span'); info.style.cssText='position:absolute;background:#CC9900;border:1px solid #990000;padding:2px;filter:alpha(opacity=80);font-size:12px'; $.tmp=info; $$.body.appendChild($.tmp); } with($.tmp.style){ $.tmp.innerHTML=$$.selection.createRange().htmlText; visibility='visible'; top=event.y+5; left=event.x; } $.over=event.srcElement; }}$$.ondragstart=function (){ return false;} </script></html>大家看看 视频流是如何由服务器端传送到网页端并播放出来的 高手请进:关于jquery弹出层拖拽不灵敏我问题 js得到页面的所有的span标签 DIV切换与超链接的比较 如何实现做一些代码发到网站上后,无需修改原网站内容,即可实现把所有网页上某个词变成链接文字 JSON问题求解 请问:在点击一个提交按钮以后怎么阻止用户在提交完成之前再次点击?假如提交的时间比较长。 字符串函数求教! table中用insertRow插入一行后,它的ln属性有何用处呢? 问关于outerHTML的问题 请问是这样制作刷新内容马 .NET下 这个脚本浏览器报错,老大们帮修改下,还有要是不用脚本用后台怎么做?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>test</title>
<style>
.input{
border-style:none;
border-bottom-color:#FFFFFF;
border-left-color:#FFFFFF;
border-top-color:#FFFFFF;
border-right-color:#FFFFFF;
height:100%;
width:100%;
}
</style>
</head><body>
<table border=1 cellpadding="0" cellspacing="0" width="300">
<tr>
<td>
<input class=input type=text onkeypress="return false" value="aaa">
</td>
<td>
<input class=input type=text onkeypress="return false" value="bbb">
</td>
<td>
<input class=input type=text onkeypress="return false" value="ccc">
</td>
</tr>
</table>
</body></html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
</head> <body>
<table cellspacing="2" cellpadding="20" border=1 >
<tr>
<td>
『公告』无忧脚本论坛关闭新会员注册
</td>
<td>
javascript标准文档以及其他标准文档 Ł 2 3 4
</td>
<td>
本版发帖规则及精华帖、Javascript 参考手册(重新整理中)
</td>
</tr>
</table>
</body>
<script type="text/javascript">
$={},$$=document;
$$.onmousedown=function (){
$.src=event.srcElement;
$.drag=true;
}
$$.onmouseup=function (){
$.drag=false;
if($.over&&($.over!=$.src)){
$.over.innerHTML+=$$.selection.createRange().htmlText;
}
if($.tmp){
$.tmp.style.visibility='hidden';
}
}
$$.onmousemove=function (){
if($.drag&&$$.selection.createRange().htmlText!=''){
if(!$.tmp){
var info=document.createElement('span');
info.style.cssText='position:absolute;background:#CC9900;border:1px solid #990000;padding:2px;filter:alpha(opacity=80);font-size:12px';
$.tmp=info;
$$.body.appendChild($.tmp);
}
with($.tmp.style){
$.tmp.innerHTML=$$.selection.createRange().htmlText;
visibility='visible';
top=event.y+5;
left=event.x;
}
$.over=event.srcElement;
}
}
$$.ondragstart=function (){
return false;
}
</script>
</html>
大家看看