Announcement

Collapse
No announcement yet.

addEventListener

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • addEventListener

    This HTML can run event listeners for your mose event to move


    HTML Code:
    <!DOCTYPE html>
    <html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <link rel="shortcut icon" href="wall.ico" sizes="16x16" type="image/x-icon">
    <style>
    #myDIV {
    background-color: coral;
    border: 1px solid;
    padding: 50px;
    color: white;
    font-size: 20px;
    }
    </style>
    </head>
    
    <body>
    
    
    <h1>addEventListener()</h1>
    
    <button onclick="startCount()" style="font-size:18px">Start count!</button>
    <input type="text" id="txt" style="width: 88px;height: 22px;" value="0">
    <button onclick="stopCount()" style="font-size:18px">Stop count!</button>
    
    <script>
    var c = 0;
    var t;
    var timer_is_on = 0;
    
    function timedCount() {
    document.getElementById("txt").value = c;
    c = c + 1;
    t = setTimeout(timedCount, 192);
    }
    
    function startCount() {
    if (!timer_is_on) {
    timer_is_on = 1;
    timedCount();
    }
    }
    
    function stopCount() {
    clearTimeout(t);
    timer_is_on = 0;
    }
    </script>
    
    
    <script>
    function myFunction() {
    document.getElementById("demo").innerHTML = "window.stop();";
    }
    function logConsoleHistory() {
    return snhb.localSettings.system.logPrefix+"("+snhb.metri cs.getTimeStamp()+"):"
    }
    function clearConsoleHistory() {
    for(var b=this.consoleHistory,a=0;a<b.length;a++)console[b[a][0]].apply(console,b[a][1])
    }
    </script>
    
    <!--?php
    ob_start();
    echo "sent to the browser";
    ob_end_clean();
    echo "sent to the browser";
    ?-->
    
    <div id="myDIV">
    <p></p><pre><h2>"Start count!"</h2>
    
    <button onclick="myFunction()" style="font-size:16px"><img src="webim_on.gif" alt="web" style="width:260px;height:120px;"></button><br>
    
    <p id="demo">window.stop();</p>
    
    window.addEventListener("loadeddata", null)
    
    function onload() {
    onloadeddata = alert("loaded");
    };
    
    function hideError() { document.getElementById("err_form").style.display = "none";
    }
    
    function value() { loadingIndicator.hide("Counter").Source +
    (b||Unspecified)
    (h&amp;&amp;"ajaxStop") ==
    b?--hideError:
    console.log(window.clearTimeout(e),
    e=!1), a(!1)
    };
    </pre><p></p>
    
    <script>
    document.getElementById("myDIV").addEventListener( "mousemove", myFunction);
    
    function myFunction() {
    document.getElementById("demo").innerHTML = Math.random();
    }
    </script>
    
    </div>
    
    
    </body></html>


    You can use this to be an object to change the flash options to get alternative content if flash player was expired and you not have time to updating!

    thankfully yours only,
    rohatos / uf2
Working...
X