This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get the form element | |
const form = document.querySelector('form'); | |
// execute function when form is submitted | |
form.addEventListener("submit", function(e) { | |
// prevent form submit and page refresh | |
e.preventDefault(); | |
// find the submit button with class | |
const $submit = form.querySelector('.contact__submit'); | |
// add the class 'clicked' to the button, to apply some nice styles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Titre de la page</title> | |
</head> | |
<body> | |
<h1>Hello World...</h1> | |
<p>Ready to start !</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//creer dossier store et mettre index.js avec export default pour vuex | |
import Vue from 'vue'; | |
import VueX from 'vuex'; | |
import axios from 'axios'; | |
Vue.use(VueX) | |
const getLocalStorage = () => { | |
let localSpecies = [] | |
for (var i = 0; i < localStorage.length-1; i++) { | |
localSpecies.push(localStorage.getItem(localStorage.key(i))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<div class="container__game" v-if="stateSpecies != null" :class="'container__game--'+threat"> | |
<div class="virtualpet__interface"> | |
<header class=""> | |
<div class="header__link" > | |
<router-link to="/map" class="button button--left"><img :src="'static/img/icons/worldmap.png'" alt="Retourner sur la carte"></router-link> | |
</div> | |
<div class="header__title" v-if='!isFound'> | |
<h1>Félicitations <br> Tu as découvert le {{ species }}!</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$min = 1; | |
$max = 1000; | |
$nbRandom = round(rand($min, $max)); | |
$nbTest = null; | |
$nbTrouve = null; | |
$nbIterations = 0; | |
echo "Et le nombre gagnant est ".$nbRandom."...".PHP_EOL; |