简体   繁体   中英

Switch Between two SSI's using jquery or javascript

got a problem with a static html page which is using server side includes.

the html of the ssi has a closing head tag and opening body tag

<-- ssi start

blah blah blah

< /head>

< body>

-->

is there any way to switch between two different SSI's where the tags cross boundries like this. i need to be able to do this for switching between mobile and desktop, and can not edit the SSI's. this is static HTML so the only way if there is one is using javascript?

You can use AJAX to load the page, parse/replace the ssi tags, and then insert the body in a div element. Current mobile frameworks do that to achive page transitions, for example https://github.com/dgileadi/zepto-page-transitions

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM