I have a piece of my javascript code here. I would like lbox.src taking a random value from a a list of websites I will give it. Could someone help me ???
var lbox = document.createElement('iframe');
lbox.src = 'http://www.websites.com';
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could define the sites into an array:
and then just select a random one from there: