1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
| <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Devis pour correction – Liliana78</title>
<style>
body {
background-size: 5px 900px, 6px 6px;
font-family: Verdana, Geneva, sans-serif;
font-size: 14px;
color: #000309;
text-align: center;
line-height: 24px;
}
#page {
width: 1200px;
margin: auto;
padding: 20px;
background: #d8d8d8; /* Old browsers */
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%, #d8d8d8), color-stop(100%, #ffffff)); /* Chrome,Safari4+ */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d8d8d8', endColorstr='#ffffff', GradientType=0); /* IE6-9 */
background: -moz-linear-gradient(top, #d8d8d8 1%, #ffffff 100%); /* FF3.6+ */
background: -webkit-linear-gradient(top, #d8d8d8 1%, #ffffff 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #d8d8d8 1%, #ffffff 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #d8d8d8 1%, #ffffff 100%); /* IE10+ */
background: linear-gradient(to bottom, #d8d8d8 1%, #ffffff 100%); /* W3C */
}
.prix {
font-weight: bold;
font-size: 200%;
color: blue;
}
h1 {
font-size: 0em;
line-height: 1em;
margin: 0;
text-transform: uppercase;
}
fieldset {
border: none;
margin: 0 0 1ex;
padding: 0;
}
.explications {
border-left: solid thin #0042b0;
padding-left: 1ex;
}
.explications ul {
list-style: none;
font-size: 14px;
font-style: italic;
padding: 0;
}
.explications li {
margin: 1ex 0;
}
.explications h2 {
font-style: italic;
font-size: 2em;
font-weight: bold;
margin: 0 0 1em;
}
explications h3 {
font-style: italic;
font-size: 2em;
margin: 0 0 1em;
}
.etape {
font-weight: bold;
text-transform: uppercase;
}
.etape::after {
content: "\00A0: ";
}
</style>
</head>
<body>
<section id="page">
<h1>Calculez le coût de votre correction</h1>
<form id="testform">
<fieldset>
<p>
<label for="nbchar" class="etape">Nombre de mots</label>
<input id="nbchar" type="text" name="nbchar" value="0"/>
</p>
<div class="explications">
<h2>Où trouver le nombre de mots ? </h2>
<ul>
<li>Word 2007, 2010 et 2013 : En bas à gauche de la fenêtre du logiciel.
</li>
<li>Word 2003/OpenOffice : Cliquez sur <strong>Outils</strong>,
puis <strong>Statistiques.</strong> Repérez la ligne
<strong>"Mots".</strong>
</li>
</ul>
</div>
</fieldset>
<fieldset>
<p>
<strong class="etape">Formule</strong>
<input id="forumle1" type="radio" name="formule" value="1" checked="checked"/>
<label for="forumle1">Simple</label>
<input id="formule2" type="radio" name="formule" value="2"/>
<label for="formule2">Approfondie</label>
</p>
<p class="details">
Voir <a href="formules/correction-reformulation">Tableau comparatif des formules de correction</a>
</p>
<p>
<label class="etape" for="formjur">Statut</label>
<select id="formjur" name="formjur">
<option value="0">Étudiant</option>
<option value="1">Particulier</option>
<option value="2">Professionnel</option>
</select>
<input type="submit" value="Calculer"/>
</p>
</fieldset>
</form>
<div id="resultat"></div>
<div id="resultatSupplement"></div>
</section>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript">// <![CDATA[
function formatNumber(num) {
return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1 ")
}
function supplement(result) {
var more = (result * 10) / 100;
return Math.ceil(result + more);
}
$(function () {
$("input:submit" ).click(
function () {
var calcul = 0;
var coefReduction = 10 / 100;
var supp;
var nbMots = $("#nbchar" ).val().replace(/[^\d]+/g, "" );
if ($("input:checked" ).val() == 1) {
supp = false;
if ($("#formjur" ).val() == 1) {
calcul = nbMots * 0.020;
} else if ($("#formjur" ).val() == 2) {
calcul = nbMots * 0.0237;
} else {
calcul = nbMots * 0.0178;
}
} else {
supp = true;
if ($("#formjur" ).val() == 1) {
calcul = nbMots * 0.0346;
} else if ($("#formjur" ).val() == 2) {
calcul = nbMots * 0.0395;
} else {
calcul = nbMots * 0.0297;
}
}
var resultat = Math.ceil(calcul);
var resultatMajore = resultat + (calcul * coefReduction);
var resultatSupplement = supplement(resultat);
var resultatSupplementMajore = Math.round(resultatSupplement + (resultatSupplement * coefReduction));
$("#resultat" ).html("Tarif généralement appliqué : <span class=\"prix\">" + formatNumber(resultat) + " € </span>/ Si correction en rouge : <span class=\"prix\">" + formatNumber(Math.round(resultatMajore)) + " € </span>" );
return false;
}
);
});
// ]]></script> |
Partager