Skip to main content

Check a value from Array in javascript?



I have a:







var pageURL = location.href; // stores the URL of the current page in the var pageURL







And I have :







var Page = Array ();

page [0] = "http://web1.com"

page [1] = "http://web2.com"

page [2] = "http://web3.com"







Now I want to make a function (called nextPage) to check which one of these pages in the array equals the PageURL. Also I need to have a button, so when I click it it will take me to the next page. What that mean I want to increment the page by 1.


Comments

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?