In diesem Artikel wird der Effekt von JavaScript beschrieben, das Eingabeaufforderungstiche mit Textinformationen aufbaut. Teilen Sie es für Ihre Referenz wie folgt weiter:
Toolstips.js:
// Position des Tooltip relativ zur Maus in Pixel // var Offsetx = 12; var offset = 8; Funktion newElement (newId) {if (document.createelement) {var el = document.createelement ('div'); el.id = newid; mit (El.Style) {display = 'none'; Position = 'absolut'; } El.InnerHtml = ''; document.body.appendchild (el); }} var ie5 = (document.getElementByIdx && document.all); var ns6 = (document.getElementByIdx &&! document.all); var ua = navigator.useragent.tolowerCase (); var isapple = (ua.indexof ('Applewebkit')! = -1: 0: 0); if (document.getElementByIdX) {var ieBody = (document.compatmode && document.compatmode! = 'backcompat')? document.documentElement: document.body; pagex = (isapple == 1? 0: (ie5)? pagey = (isapple == 1? 0: (ie5)? ieBody.scrolltop: window.pageyOffset); mousex = (IE5)? Event.x: (ns6)? clientx = e.clientX: false; mousey = (IE5)? Event.y: (ns6)? clienty = e.clienty: false; var lixlpixel_tooltip = document.getElementByIdX ('toolTip'); lixlpixel_tooltip.style.left = (mousex+pagex+offsetx)+'px'; lixlpixel_tooltip.style.top = (mausy+pagey+offsety)+'px'; }} function tOoltip (TIP) {if (! document.getElementByIdX ('tOoltip')) newElement ('toolTip'); var lixlpixel_tooltip = document.getElementByIdX ('toolTip'); lixlpixel_tooltip.innerhtml = TIP; lixlpixel_tooltip.style.display = 'block'; document.onmousemove = getMouseposition;} function exit () {document.getElementByIdX ('Tooltip'). style.display = 'none';}test.html
<html> <kopf> <style> .tableBorder7 {Breite: 800; Solid; background-color: #000000;}TD{font-family: 安体;font-size: 12px;line-height: 15px;}th{background-color: #f7f7f7;color: #000000;font-size: 12px;font-weight:bold;}th.th1{background-color: #333333;}td.TableBody7{background-color: #B1ea45;} </style> <script langual = "javaScript" src = 'tooltips.js'> </script> </head> <body> <div onmouseover = "tOoltip ('Wenn Sie einen Podcast hinzufügen, wählen Sie dieses Kontrollkästchen.For more information about JavaScript related content, please check out the topics of this site: "Summary of JavaScript Prompt Box Effects", "Summary of JavaScript Switching Special Effects and Skills", "Summary of JavaScript Search Algorithm Skills", "Summary of JavaScript Animation Special Effects and Skills", "Summary of JavaScript Errors and Debugging Skills", "Summary of JavaScript Data Structures and Algorithm Fähigkeiten "," Zusammenfassung des JavaScript -Traversalalgorithmus und der Fähigkeiten "und" Zusammenfassung der Verwendung von JavaScript Mathematical Operation Nutzung ""
Ich hoffe, dieser Artikel wird für JavaScript -Programme aller hilfreich sein.