Tips for webpage creation (continued)

Source: Internet
Author: User
Tags setinterval visibility
Q: Double-click automatic screen scrolling.
A: add the following code to the page for automatic screen scrolling.
<S required Language = "Javas alias">
Var currentpos, timer;
Function initialize (){
Timer = setInterval ("scrollwindow ()", 1 );
Function SC (){
ClearInterval (timer );
Function scrollwindow (){
Currentpos = document. body. scrollTop;
Window. scroll (0, ++ currentpos );
If (currentpos! = Document. body. scrollTop ){
SC ();
Document. onmousedown = SC;
Document. ondblclick = initialize;
</S response>
Q: Mouse effect.
A: place the cursor over the link and A text description box appears, which contains A scroll text description.
<A href = "" target = "_ blank" onMouseOver = "helpor_net_show (this, event, 'Here is Guo's personal homepage ')" onMouseOut = "helpor_net_hide () "> put the mouse up and try again.
<Div id = "tooltip2" style = "position: absolute; visibility: hidden; clip: rect (0 150 50 0); width: 150px; background-color: seashell">
<Layer name = "nstip" width = "1000px" bgColor = "seashell"> </layer>
<SCRIPT language = "JavaScript">
<! --
If (! Document. layers &&! Document. all)
Event = "test"
Function helpor_net_show (current, e, text ){
If (document. all & document. readyState = "complete "){
Document. all. tooltip2.innerHTML = '<marquee style = "border: 1px solid # 3399ff">' + text + '</marquee>'
Document. all. pixelLeft = event. clientX + document. body. scrollLeft + 10
Document. all. pixelTop = event. clientY + document. body. scrollTop + 10
Document. all. visibility = "visible"
Else if (document. layers ){
Document.tooltip2.document.nstip.doc ument. write (''+ text + '')
Document.tooltip2.document.nstip.doc ument. close ()
Document.tooltip2.doc ument. nstip. left = 0
Currentscroll = setInterval ("scrolltip ()", 100)
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.