Das folgende Code-Schnipsel enthält einen Array arr mit 8*9 = 72 Zahlen.
Was soll das Code-Schnipsel bewirken?
Richtige Aussagen bitte ankreuzen.
<script>
var captcha = (function (anz) {'use strict';
var arr = [
49, 50, 51, 52, 53, 54, 55, 56, 57,
49, 50, 51, 52, 53, 54, 55, 56, 57,
10102, 10103, 10104, 10105, 10106, 10107, 10108, 10109, 10110,
10122, 10123, 10124, 10125, 10126, 10127, 10128, 10129, 10130,
9312, 9313, 9314, 9315, 9316, 9317, 9318, 9319, 9320,
10112, 10113, 10114, 10115, 10116, 10117, 10118, 10119, 10120,
9332, 9333, 9334, 9335, 9336, 9337, 9338, 9339, 9340,
9352, 9353, 9354, 9355, 9356, 9357, 9358, 9359, 9360],
i, j, k, len = arr.length, num ='', txt ='',
sty = 'font-style:italic;';
for (i = 0; i < anz; i += 1) {
j = 0.95 + Math.random() * 1.6;
k = Math.floor(Math.random() * len);
num += 1 + k % 9;
if(k % 3 === 0) { txt += "<span style='"+sty+"'>&#";
} else { txt += "<span style='font-size:"+j+"em;'>&#";
} txt += arr[k]+"; </span>"; } return {num:num, txt:txt};
}(4));
window.onload = function(){
document.getElementById('CAPTCHA_PIC').innerHTML = captcha.txt;
}
</script>
<p id="CAPTCHA_PIC"></p>
<form action="#"
onsubmit="alert(this.CAPTCHA_TXT.value===captcha.num);return false;">
<input type="text" name="CAPTCHA_TXT" value="" />
<input type="submit" value="Ist CAPTCHA ok?" />
</form>