Today, when I finally moved the mouse to a certain area, the code for displaying the floating box text was given:
First of all:
Function mm_findobj (n, d) {
VAR P, I, X;
IF (! d) d = document;
IF ((p = n.indexof ("?"))> 0 && parent.frames.length) {
D = parent.frames [n.substring (p 1)]. document;
n = n.substring (0, p);
}
IF (! (x = d [n]) && D.all) x = D.All [n];
For (i = 0;! x && i
For (i = 0;! x && D.layers && i
X = mm_findobj (n, d.layers [i] .document);
IF (! x && d.getlementByid) x = D.GetElementByid (n);
Return window.hintdiv;
}
Function mm_settextoflayer (ObjName, X, NewText) {
Newtext = "
< Tr>
8A
2BE2 / "> NewText " font> td> tr> table> td> tr> table> "
IF ((Obj = mm_findobj (objName))! = null) with (obj)
IF (Document.layers) {
Document.write (unscape (newtext);
Document.close ();
}
Else InnerHtml = Unescape (NewText);
}
Function mm_showhideLayers () {
VAR I, P, V, Obj, Args = mm_showhideness.Arguments;
For (i = 0; i <(args.length-2); i = 3) IF ((OBJ = mm_findobj (args [i]))! = null) {v = args [i 2];
IF (Obj.Style) {Obj = Obj.Style; V = (v == 'show')? 'visible' :( v == 'hide')? 'hidden': v;
Obj.visibility = v;}}
Function MM_ChangeProp (ObjName, X, Theprop, Thevalue) {//v6.0
Var obj = mm_findobj (ObjName);
IF (Obj && ("style.") == - 1 || Obj.style) {
IF (Thevalue == True || thevalue == false)
Eval ("Obj." theprop "=" thevalue);
Else Eval ("Obj." theprop "= '" thevalue "');
}
}
// ->
script>
Then add the layer on the page:
); mm_showhideness (' overdiv ',' ',' show ');
MM_ChangeProp ('overdiv', '', 'style.left', 'Div'); mm_changeprop ('overdiv', '', 'style.top', window.event.y 10, 'div ");
MM_ChangeProp ('Overdiv', '', 'Style.Width', <% = intlength%> * 13, 'div'); "onmouseout =" mm_showhideness ('overdiv', '', 'hide'); ">> If you have a lot of money, the little woman is here, chatting, chatting!
转载请注明原文地址:https://www.9cbs.com/read-112978.html