English 中文(简体)
用闪光[闭]将移动电话从网站转拨最简单的方式
原标题:Simplest way to redirect a mobile phone away from a website with Flash [closed]
  • 时间:2011-10-12 14:55:32
  •  标签:
  • html
  • flash
Closed. This question needs to be more focused. It is not currently accepting answers.

更新问题,只通过

Closed 2 years ago.

简言之,我有一个闪电网站。 我网站上也有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>




相关问题
CSS working only in Firefox

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....

image changed but appears the same in browser

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. ...

Firefox background image horizontal centering oddity

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 ...

Separator line in ASP.NET

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!

热门标签