/**
*
*请问做这个程序有多大的技术难度?大概需要多少行代码?
*
**/
1:楼主说的是中间横条工具条吧,如果是的话,我试着做了些操作看样子有去与服务器操作,且页面没有刷新可能用了框架,很有可能用了“阿甲”;
“技术难度”:主要用到的是javascript,还有就上述两种技术
“大概需要多少行代码”,这个可能得看你具体需求。2:基本功能是要求用户鼠标指到哪里就读哪里
这主要是对这个结点进行了定位,楼主可以参照position,z-index,top等相关属性;
*
*请问做这个程序有多大的技术难度?大概需要多少行代码?
*
**/
1:楼主说的是中间横条工具条吧,如果是的话,我试着做了些操作看样子有去与服务器操作,且页面没有刷新可能用了框架,很有可能用了“阿甲”;
“技术难度”:主要用到的是javascript,还有就上述两种技术
“大概需要多少行代码”,这个可能得看你具体需求。2:基本功能是要求用户鼠标指到哪里就读哪里
这主要是对这个结点进行了定位,楼主可以参照position,z-index,top等相关属性;
解决方案 »
- 请教:HTML5的draggable相关
- html标签属性中含有特定字符匹配【高分求救】
- 我是小白,想了很久,查了很久,搞不通了,忍不住又来打扰大家。。。
- 在线等,高分求解:两个效果在页面时显示(均提示源代码)---高人也许只需一下下,谢谢!!!
- JS编辑器即时显示问题(如能解决,可付报酬)
- netscape下document.open问题
- JS的function 返回值问题 求解
- 如何在选择dropdownlist最后一值时触发事件?
- 关于404错误的问题,搜了好多方法一直解决不了,求大神来看看
- console下object数组不显示的问题
- 怎样写字符间的循环语句?
- 关于style="position:absolute;"导致的问题
由谁能够提供一段代码吗?
<html>
<head>
<script type="text/javascript">
document.onmousemove = function()
{
whichElement(event);
}
function whichElement(e)
{
var targ;
if (!e) var e = window.event;
if (e.target) targ = e.target;
else if (e.srcElement) targ = e.srcElement;
window.status = targ.innerText;
}
</script>
</head><body>
some plain text!<p>Click somewhere in the document. An alert box will alert the tag name of the element you clicked on.</p><h3>This is a header</h3>
<p>This is a paragraph</p>
<img border="0" src="ball16.gif" width="29" height="28" alt="Ball">some other plain text!
</body></html>
TextRectangle
getClientRects
getBoundingClientRect
看这些相关函数
<HTML>
<HEAD>
<TITLE>TextRectangle Object demo</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1">
<META NAME="AUTHOR" CONTENT="InetSDK">
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META NAME="ROBOTS" CONTENT="noindex"><LINK REL="stylesheet" HREF="/workshop/samples/author/dhtml/refs/samplesSDKIE4.css" TYPE="text/css"><SCRIPT>
document.parentWindow.status = "";
var timid = -1;
var timoID_2 = -1;
var nLine;
var nPosInLine;
var oRcts;
var nDivLen;
var nEraser;function LoadDone() {
oTextRange = document.body.createTextRange();
oRcts = oTextRange.getClientRects(); // Get bounding rect of the range
nLine = 0;
oBndRct = obj.getBoundingClientRect();
nDivLen = oBndRct.right - oBndRct.left + 1;
MoveTo();
}function MoveTo() {
if(nLine >= oRcts.length) {
nLine = 0;
}
obj.style.top = oRcts[nLine].top;
nPosInLine = oRcts[nLine].left;
nEraser = 0;
timoID_2 = setInterval("MoveToInLine()",60);
}function MoveToInLine() {
if(nPosInLine >= oRcts[nLine].right - nDivLen) {
clearInterval(timoID_2);
timoID_2 = -1;
obj.style.left = oRcts[nLine].right - nDivLen;
nLine++;
timid = setTimeout("MoveTo()", 100);
return;
}
if(nEraser == 0) {
nEraser = 1; im.src = "/workshop/graphics/dot.gif";
} else {
nEraser = 0; im.src = "/workshop/graphics/dot.gif";
}
obj.style.left = nPosInLine;
nPosInLine += 3;
}function End() {
if(timid != -1)
clearInterval(timid);
timid = -1;
if(timoID_2 != -1)
clearInterval(timoID_2);
timoID_2 = -1;
}
</SCRIPT>
</HEAD>
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END--><BODY ID="bodyid" onload="LoadDone()" onresize="End();LoadDone()" onunload="End()" TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
LINK="#000000" VLINK="#808080" ALINK="#000000">
fdsfdsfds
<BLOCKQUOTE CLASS="body">
fdsfdsfdsfdsfd
<P STYLE="text-align:center">
<B> The quick brown fox</B>
<BR>
<P ALIGN="center">The <BR> quick brown fox <BR>
<UL>
<LI>The quick brown fox
</UL>
<UL>
<LI>The quick </LI>
<LI>The quick brown fox </LI>
<LI>The quick brown fox jumps over </LI>
<LI>The quick brown fox jumps over the lazy dog. </LI>
</UL><P><BLOCKQUOTE>
Notice that as you resize the window, the coordinates are not adjusted, since the coordinates are set at <B>onload</B>.</BLOCKQUOTE><CENTER>
<BR><BR><BR>
<HR>
Right-click anywhere in the window to view the source code.
</CENTER>
<DIV ID="obj" STYLE="position:absolute"><IMG ID="im" SRC="/workshop/graphics/dot.gif" WIDTH="16" HEIGHT="16" border="0" alt="*"> </DIV>
</P><!-- @ED a-carolk: what is this dot doing here? --><!-- START_PAGE_FOOTER -->
<BR><BR><BR>
© <A CLASS="clsIncCpyRt" HREF="http://www.microsoft.com/isapi/gomscom.asp?TARGET=/info/cpyright.htm" TARGET="_top"> 2002 Microsoft Corporation. All rights reserved. Terms of use</A>.
<!-- END_PAGE_FOOTER -->
</BLOCKQUOTE>
</BODY>
</HTML>