Identity Safety v3.5
HTML
<h> <b>How Safe Is Your Identity? </b></h>
<p>
1. Have you ever given out your personal information?
</p>
<input type="radio" id="r" name="1" value="Yes">Yes
<br>
<input type="radio" id="r0" name="1" value="No">No
<br>
<p>
2. Have you ever given your password to someone?
</p>
<input type="radio" id="r1" name="2" value="Yes">Yes
<br>
<input type="radio" id="r2" name="2" value="No">No
<br>
<p>
3. How many times has an account of yours been hacked?
</p>
<input type="radio" id="r3" name="3" value="0">Never
<br>
<input type="radio" id="r4" name="3" value="1">Once
<br>
<input type="radio" id="r5" name="3" value="2">More Than Once
<br>
<p>
4. Please open a Google tab, and search your own name. Out of the first 10 photo results, how many are of you or are yours?
</p>
<input type="radio" id="r6" name="4" value="0">0
<br>
<input type="radio" id="r7" name="4" value="1">1
<br>
<input type="radio" id="r8" name="4" value="2">2
<br>
<input type="radio" id="r9" name="4" value="3">3
<br>
<input type="radio" id="r10" name="4" value="4">4
<br>
<input type="radio" id="r11" name="4" value="5">5
<br>
<input type="radio" id="r12" name="4" value="More">6 or more
<br>
<p>
5. What social medias do you use? (Please select only one option)
</p>
<input type="radio" id="r13" name="5" value="Facebook">Facebook
<br>
<input type="radio" id="r14" name="5" value="Twitter">Twitter
<br>
<input type="radio" id="r15" name="5" value="Instagram">Instagram
<br>
<input type="radio" id="r16" name="5" value="Tumblr">Tumblr
<br>
<input type="radio" id="r17" name="5" value="Snapchat">Snapchat
<br>
<input type="radio" id="r18" name="5" value="Multiple">Mutiple
<br>
<input type="radio" id="r18" name="5" value="None">None
<br>
<br>
<button type="button" id="FnshBttn">Finish</button>
CSS
body {
background-color: #FA8A50;
}
JavaScript
var unsafety = 0;
document.getElementById("FnshBttn").onclick = function() {
if (document.getElementById('r').checked) {
unsafety += 15;
}
if (document.getElementById('r1').checked) {
unsafety += 20;
}
if (document.getElementById('r4').checked) {
unsafety += 5;
}
if (document.getElementById('r5').checked) {
unsafety += 1.5;
}
if (document.getElementById('r7').checked) {
unsafety += 3;
}
if (document.getElementById('r8').checked) {
unsafety += 4.5;
}
if (document.getElementById('r9').checked) {
unsafety += 6;
}
if (document.getElementById('r10').checked) {
unsafety += 7.5;
}
if (document.getElementById('r11').checked) {
unsafety += 9;
}
if (document.getElementById('r12').checked) {
unsafety += 1.5;
}
if (document.getElementById('r13').checked) {
unsafety += 1.5;
}
if (document.getElementById('r14').checked) {
unsafety += 1.5;
}
if (document.getElementById('r15').checked) {
unsafety += 1.5;
}
if (document.getElementById('r16').checked) {
unsafety += 1.5;
}
if (document.getElementById('r17').checked) {
unsafety += 1.5;
}
if (document.getElementById('r18').checked) {
unsafety += 10;
}
if(unsafety<12) {
alert("Nice! You're pretty safe online!");
}
if (unsafety>12 && unsafety<37) {
alert("You could be safer. Altogether, not horrible!");
}
if (unsafety>37) {
alert("You should probably clean up your online presence. You're not terribly safe.");
}
}