单元格拖拽的问题 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>大家看看 TreeTable怎样动态加载数据,求高手解决 在FireFox下如何判断2个变量指向同一个文本框 求验证合法文件路径的js js重要问题 删除cookie问题。 SWFOject问题,请求参数为什么返回不了值 讨教,如何在脚本函数中调用脚本函数? 有二级连动的一个表单提交有错误返回,二级连动中的数据就变成白 如何传递这个参数? window.top.right.location.reload() 这段是什么意思 请问是这样制作刷新内容马 .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>
大家看看