Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="bg">
- <head>
- <meta charset="utf-8">
- <title> Uprazhenie JavaScript </title>
- <script>
- window.onload = function(){
- alert(Date());
- }
- </script>
- <script>
- function function1(){
- document.getElementById("styleMe").style.color="green";
- document.getElementById("styleMe").style.background="blue";
- document.getElementById("styleMe").style.fontWeight = "900";
- document.getElementById("styleMe").style.fontStyle = "italic";
- }
- </script>
- </head>
- <body>
- <div id="styleMe">Примерен текст – JavaScript пример.</div>
- <button type="button" onclick="function1()" style="margin-bottom: 15px;">Style me!</button>
- <p id="show"></p>
- <button type="button"onclick='document.getElementById("show").innerHTML = "Radostina Kondakova"' style="marginbottom:15px;">Show me!</button>
- <button type="button"onclick='document.getElementById("show").innerHTML = " "' style="marginbottom:15px;">Hide me!</button>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement