How do not come out.... Sweat...

JS implementation using a typewriter character output effect.
The code will not give up, I look up dizzy. . .
Also, how to achieve in a page, a paragraph of text has followed the mouse to the left or the right? ? ?

Started by Lucia at November 14, 2016 - 11:22 PM

Use the mouse onmove event

Posted by Herman at November 26, 2016 - 12:08 AM

What can elaborate... This I have not used, not

Posted by Lucia at December 01, 2016 - 12:23 AM

A try: )
<html>
<head>
    <title></title>
    <script type="text/javascript">
        message = "Ah Edward return data amino acid recovery 10 jin ah ah lost vacation Harbin Duijingguahua a CPA recovery volume cassette to cassette tape roll payment is accounting method of Harbin space low power o accountant delivery"
        pos = 0     /*The initial section character position*/
        maxlength = message.length + 1
        function writemsg() {
            if (pos <maxlength) {
                txt = message.substring(pos, 0)
                document.forms[0].vito.value = txt
                document.forms[0].vito.style.color = '#00F'     /*Set up the font style*/
                timer = setTimeout("writemsg()", 50)    /*Set the interval of 50 ms play a word*/
                pos++
            }
        }

    </script>
</head>
<body>
    <form action="">
    <textarea rows="10" cols="160" id="vito"></textarea><br />
    <input type="button" onclick="writemsg()" value="Start" />
    </form>
</body>
</html>

Posted by William at December 15, 2016 - 12:33 AM

Halo, did not see clearly. Mistake

Posted by William at December 22, 2016 - 1:31 AM

How to achieve in a page, a paragraph of text has followed the mouse to the left or the right? ? ?

Set the text the location of the div onmove event

Posted by William at January 04, 2017 - 1:39 AM

OK, however, I suddenly exclaimed after reading. ,. I am typing if so quickly. . .
The onmove event is not know... Can you give me an example I have a look at it, learning this is such, see what all understand.. Don't see don't understand, the concept of computer language is too difficult to understand!!!

Posted by Lucia at January 05, 2017 - 1:57 AM

Examples of words to see this

http://api.jquery.com/mousemove/

Posted by Herman at January 07, 2017 - 2:47 AM