1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I wonder what is the mistake

Discussion in 'Scripting' started by SCGA, Apr 10, 2017.

  1. SCGA

    SCGA BANNED BANNED

    Joined:
    Apr 10, 2017
    Messages:
    23
    Likes Received:
    4
    Gender:
    Male
    Code:
    <p><a href="#" onclick="setTimeout(Plus.style.display='none'), 2000">Close</a></p>
    I want to close Plus after 2 seconds clicking Close. Currently when I click Close, Plus close immediately without waiting for 2 seconds.
     
    Last edited: Apr 10, 2017
  2. SCGA

    SCGA BANNED BANNED

    Joined:
    Apr 10, 2017
    Messages:
    23
    Likes Received:
    4
    Gender:
    Male
    I have solve the problem with :

    <script>function myfunction(){Plus.style.display='none'} var delay=2000</script>