I am trying to link multiple html pages with each other by the use of javascript.
I have a code:
if
((screen.width>=768) && (screen.height>=1024)) {
alert('Screen size: 768x1024 or lower');
$("link[' C:\Users\Erik\Desktop\ThemaparkMikuMiku\Website\tabletview.html']");
}
but an error comes up saying:
"uncaught syntax error, unrecognized expression [' C:\\Users\\Erik\\Desktop\\ThemaparkMikuMiku\\Website\\tabletview.html']
I am also pretty new to javascript though looking alot on the internet, sadly the answer to this question I could never find.
Please help!
Sorry for your time.
I have created 9 html files(3 for tablet, 3 for mobile and 3 for PC version).
I want to link them all together so that if you are with your mobile on the pc version javascript runs a check and loads the mobile version.
I know media queries are there but in my case I thought this was easier..
Why do you want to do this? Is it for a responsive design? Because there is a much easier way for it, its called media queries read about it in this article: http://css-tricks.com/css-media-queries/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.