-2
可以幫我打印上新的HTML頁面captcah 我媒體鏈接到我的javascrip.js鏈接到我的index.html斜面打印Captcah陣列
function autoCaptcah() // munculkan Captcah
{
var temp1 = new Array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z');
var temp2 = new Array('1','2','3','4','5','6','7','8','9','0');
//do looping for the captcah
for(var i = 0; i<5; i++)
{
var huruf1 = temp1[Math.floor(Math.random()*temp1.length)];
var huruf2 = temp1[Math.floor(Math.random()*temp1.length)];
var angka1 = temp2[Math.floor(Math.random()*temp2.length)];
var angka2 = temp2[Math.floor(Math.random()*temp2.length)];
var angka3 = temp2[Math.floor(Math.random()*temp2.length)];
var captcah = huruf1+huruf2+angka1+angka2+angka3;
document.getElementById("commandCaptcah").value = captcah;
}
}