Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const neededUsername = "1";
- const neededPassword = "11";
- function verify() {
- var username = document.getElementById("username").value;
- var password = document.getElementById("password").value;
- if (username == neededUsername && password == neededPassword) {
- top.location = "index.html";
- }
- else {
- alert(`Нямате право на достъп.`);
- }
- }
- //---------------------------------------------------------------------------------------------------------------------//
- function changeOptionColor() {
- if (document.getElementById("subscription").selectedIndex == "0") {
- document.getElementById("yes").style.backgroundColor = "green";
- alert("Да - правилен отговор!");
- }
- else {
- if (document.getElementById("subscription").selectedIndex == "2") {
- document.getElementById("no").style.backgroundColor = "red";
- alert("Вашият избор: Не");
- }
- else if (document.getElementById("subscription").selectedIndex == "1") {
- document.getElementById("maybe").style.backgroundColor = "red";
- alert("Вашият избор: Може би");
- }
- }
- }
- //--------------------------------------------------------------------------------------------------------------------//
- function dropdown(sublink_id, triangle_id){
- if(document.getElementById(sublink_id).style.display === ""){
- document.getElementById(triangle_id).style.transform = "rotate(180deg)"
- document.getElementById(sublink_id).style.display = "block";
- }
- else{
- document.getElementById(triangle_id).style.transform = "rotate(90deg)"
- document.getElementById(sublink_id).style.display = "";
- }
- }
- //----------------------------------------------------------------------------------------------------------------//
- var images = [], currentImg = 0;
- images[0] = "../photos/photo-9.jpg";
- images[1] = "../photos/photo-8.jpg";
- images[2] = "../photos/photo-12.jpg";
- function nextImage(){
- currentImg = currentImg >= images.length - 1 ? 0 : ++currentImg;
- document.getElementById("switching-img").src = images[currentImg];
- }
- function previousImage(){
- currentImg = currentImg <= 0 ? images.length - 1 : --currentImg;
- document.getElementById("switching-img").src = images[currentImg];
- }
- setInterval(nextImage, 3000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement