javascript - Apache Cordova create common Js File -


i new apache cordova. want create app can display many different webpages (one @ time) going on respective url, this:

index.html

<head>   ...   <script type="text/javascript" src="index.js"></script>   ... </head> <body>   ... </body> 

index.js

... switch(choice) { case 1:    window.location="www.site1.com";   break; case 2:    window.location="www.site1.com";   break; case 3:    window.location="www.site1.com";   break; } ... 

when go on website other code write in index.js not work, how can add common .js pages?

thanks


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -