search

Home  >  Q&A  >  body text

As soon as the web page is opened, the numbers 1-6 are required to pop up in sequence, and each time they pop up, the page displays a corresponding title line (that is, from h1-h6). Note that h1-h6 tags should not appear on the page, but should be written by js.

Don’t know how to answer


哆啦A梦哆啦A梦2439 days ago1791

reply all(1)I'll reply

  • 林达斯

    林达斯2018-04-09 21:21:51

    <script>
    for( var i = 1 ; i <= 6 ; i++ ){
    	alert( i ) ;
    	document.write( "<h" + i + ">" + "h" + i + "</h" + i + ">"  )
    }
    </script>

    Like this?

    reply
    3
  • Cancelreply