SHARE
TWEET

Untitled

a guest Jul 24th, 2019 107 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const neededUsername = "1";
  2. const neededPassword = "11";
  3.  
  4. function verify() {
  5.     var username = document.getElementById("username").value;
  6.     var password = document.getElementById("password").value;
  7.     if (username == neededUsername && password == neededPassword) {
  8.         top.location = "index.html";
  9.     }
  10.     else {
  11.         alert(`Нямате право на достъп.`);
  12.     }
  13. }
  14.  
  15. //---------------------------------------------------------------------------------------------------------------------//
  16. function changeOptionColor() {
  17.     if (document.getElementById("subscription").selectedIndex == "0") {
  18.         document.getElementById("yes").style.backgroundColor = "green";
  19.         alert("Да - правилен отговор!");
  20.     }
  21.     else {
  22.         if (document.getElementById("subscription").selectedIndex == "2") {
  23.         document.getElementById("no").style.backgroundColor = "red";
  24.         alert("Вашият избор: Не");
  25.         }
  26.         else if (document.getElementById("subscription").selectedIndex == "1") {
  27.         document.getElementById("maybe").style.backgroundColor = "red";
  28.         alert("Вашият избор: Може би");
  29.         }
  30.     }
  31. }
  32.  
  33. //--------------------------------------------------------------------------------------------------------------------//
  34. function dropdown(sublink_id, triangle_id){
  35.     if(document.getElementById(sublink_id).style.display === ""){
  36.         document.getElementById(triangle_id).style.transform = "rotate(180deg)"
  37.         document.getElementById(sublink_id).style.display = "block";
  38.     }
  39.     else{
  40.         document.getElementById(triangle_id).style.transform = "rotate(90deg)"
  41.         document.getElementById(sublink_id).style.display = "";
  42.     }
  43. }
  44. //----------------------------------------------------------------------------------------------------------------//
  45. var images = [], currentImg = 0;
  46. images[0] = "../photos/photo-9.jpg";
  47. images[1] = "../photos/photo-8.jpg";
  48. images[2] = "../photos/photo-12.jpg";
  49.  
  50. function nextImage(){
  51.     currentImg = currentImg >= images.length - 1 ? 0 : ++currentImg;
  52.     document.getElementById("switching-img").src = images[currentImg];
  53. }
  54.  
  55. function previousImage(){
  56.     currentImg = currentImg <= 0 ? images.length - 1 : --currentImg;
  57.     document.getElementById("switching-img").src = images[currentImg];
  58. }
  59.  
  60. setInterval(nextImage, 3000);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top