ai3rules
09-07-2003, 01:32 PM
function arrayGenerator() {
var name = prompt("Enter name of the array")
var amount = prompt("Enter length of the array")
for (i = 0; i < amount; i++) {
document.write(name +"["+ i +"]" +" = "+ '" ' + ' "' +'<br>')
}
}
That is a simple script i wrote just so that i dont have to type the name of arrays a million times. However the problem is, is that when that script writes it out, i cannot just copy it and paste it directly from the webpage since it will paste with the <br> etc....
So, I was wondering if there was any way that i could have the script write that text directly to notepad.
var name = prompt("Enter name of the array")
var amount = prompt("Enter length of the array")
for (i = 0; i < amount; i++) {
document.write(name +"["+ i +"]" +" = "+ '" ' + ' "' +'<br>')
}
}
That is a simple script i wrote just so that i dont have to type the name of arrays a million times. However the problem is, is that when that script writes it out, i cannot just copy it and paste it directly from the webpage since it will paste with the <br> etc....
So, I was wondering if there was any way that i could have the script write that text directly to notepad.