简言之,我有一个闪电网站。 我网站上也有PDF版本的信息。 我要补充的是确定要求网站的浏览器(或平台),如果是移动装置(或闪电装置,即Pipe或iPad)将用户转至PDF。
我认为,这应该是一些简便的 Java,我刚才从未讨论过需要从前一个地点这样做的问题。
简言之,我有一个闪电网站。 我网站上也有PDF版本的信息。 我要补充的是确定要求网站的浏览器(或平台),如果是移动装置(或闪电装置,即Pipe或iPad)将用户转至PDF。
我认为,这应该是一些简便的 Java,我刚才从未讨论过需要从前一个地点这样做的问题。
我没有使用这两种方法,但这里是我在快速搜查后发现的两个例子:
http://www.hackingethics.com/blog/2011/02/06/how-to-redirect-your-website-to-mobile-website-on-mobile-devices-by-javascript/ This one tests whether the navigator is one of several mobile types, and then redirects.
http://css-tricks.com/snippets/javascript/redirect-mobile-devices/ This one has a method of testing the screen size. If the screen is small enough to be mobile, it redirects the browser to the mobile version.
d 我建议你使用像PHP这样的服务器边检,因为大多数流动浏览器不支持javascript。 如果用户代理人是流动的,则进行核对。
由于移动设备(或至少是桌子)开始提供支助 闪电,我 blanket不反对在 que中带有“Mobile”的任何东西。 相反,我建议进行特征检查。 由于流动浏览器带宽有限,对移交的数据收取费用,而且可能不支持PDF,我还建议让国防军选择航行。
<script type="text/javascript">
if(!navigator.mimeTypes["application/x-shockwave-flash"]) {
if(confirm( Your browser does not support flash? Would you like +
view the PDF version? (25kB) )) {
location.replace( static_file.pdf );
} else {
// Show some "We re sorry" content.
}
}
</script>
<noscript>
<p>This requires Flash. <a href="static_file.pdf">Click here to
view the PDF version. (25kB)</a></p>
</noscript>
I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....
I have a div <div id="masterdiv"> which has several child <div>s. Example: <div id="masterdiv"> <div id="childdiv1" /> <div id="childdiv2" /> <div id="...
I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...
<form><input type="file" name="first" onchange="jsFunction(2);"> <input type="file" name="second" onchange="jsFunction(3);"</form> Possible to pass just numbers to the js ...
So I ve got a menu with a hover/selected state and it loads fine in IE6/IE7. However when I scroll down the page and put the element outside of the viewport and then back in I get a broken image! I ...
I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...
Is it possible to reload a form after file-input change? I have a form where the user can chose an image for upload. I also have a php script which displays that image resized. I only wonder if it ...
I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!