Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QUIZ
- <script>
- function check() {
- var answer1, answer2, answer3, text;
- // Get the value of the input field with id="numb"
- answer1 = document.getElementById("answer1").value;
- answer2 = document.getElementById("answer2").value;
- // If x is Not a Number or less than one or greater than 10
- if (/*isNaN(answer1)*/answer1!="four" && answer1!="Four" && answer1!=4) {
- text = "Incorrect";
- text = text.fontcolor("red");
- } else {
- text = "Correct";
- text = text.fontcolor("green");
- }
- document.getElementById("correct1").innerHTML = text;
- if (answer2!="Australia" && answer2!="australia") {
- text = "Incorrect";
- text = text.fontcolor("red");
- } else {
- text = "Correct";
- text = text.fontcolor("green");
- }
- document.getElementById("correct2").innerHTML = text;
- }
- </script>
- ZEGAR
- <script>
- function startTime() {
- var today = new Date();
- var month = new Array();
- month[0] = "January";
- month[1] = "February";
- month[2] = "March";
- month[3] = "April";
- month[4] = "May";
- month[5] = "June";
- month[6] = "July";
- month[7] = "August";
- month[8] = "September";
- month[9] = "October";
- month[10] = "November";
- month[11] = "December";
- var h = today.getHours();
- var m = today.getMinutes();
- var s = today.getSeconds();
- h = checkTime(h);
- m = checkTime(m);
- s = checkTime(s);
- document.getElementById('time').innerHTML =
- h + ":" + m + ":" + s + " " + month[today.getMonth()] + " " + today.getDay();
- var t = setTimeout(startTime, 500);
- }
- function checkTime(i) {
- if (i < 10) {i = "0" + i};
- return i;
- }
- </script>
- <body onload="startTime()">
- <p id="time"></p>
- EFEKTY
- <script>
- var x = 0;
- var sound = new Audio("https://www.myinstants.com/media/sounds/and-his-name-is-john-cena-1.mp3");
- function areYou() {
- if (x != 0) {
- //document.getElementById("name").innerHTML = x;
- document.body.style.backgroundImage = "url('background.jpg')";
- document.body.style.backgroundSize = "3008px";
- document.getElementById("container").style["opacity"] = "1";
- sound.pause();
- x = 0;
- }
- else {
- document.body.style.backgroundImage = "url('http://cdn.makeagif.com/media/8-27-2015/edWylV.gif')";
- document.body.style.backgroundSize = "100%";
- document.getElementById("container").style["opacity"] = "0";
- sound.currentTime = 1.5;
- sound.play();
- x = 1;
- }
- }
- </script>
- <button style="margin: 5px;" onClick="areYou()">On/Off</button>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement