16 lines
482 B
JavaScript
16 lines
482 B
JavaScript
|
var el = document.getElementById('deb');
|
||
|
|
||
|
for (var i = 0; i < 3; i++) {
|
||
|
var newElement = el.appendChild(document.createElement('a'));
|
||
|
url = Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 2);
|
||
|
console.log(url);
|
||
|
for (var j = 0; j < url.length; j++) {
|
||
|
url[j] = url[j] % 26 + 'a'
|
||
|
}
|
||
|
newElement.title = 'tanche'
|
||
|
newElement.href = 'http://' + url + '.com'
|
||
|
newElement.appendChild(document.createTextNode("pte"));
|
||
|
console.log("enroute" + i);
|
||
|
}
|
||
|
console.log("fin");
|