<script type="text/javascript">
$(function(){
// 获取终端的相关信息
var Terminal = {
// 辨别移动终端类型
platform : function(){
var u = navigator.userAgent, app = navigator.appVersion; return {
// android终端或者uc浏览器
android: u.indexOf('Android') > - || u.indexOf('Linux') > -,
// 是否为iPhone或者QQHD浏览器
iPhone: u.indexOf('iPhone') > - ,
// 是否iPad
iPad: u.indexOf('iPad') > -,
// 是否是通过微信的扫一扫打开的
weChat: u.indexOf('MicroMessenger') > -, isiOS9: Boolean(u.match(/OS []_\d[_\d]* like Mac OS X/i)) };
}(),
// 辨别移动终端的语言:zh-cn、en-us、ko-kr、ja-jp...
// language : (navigator.browserLanguage || navigator.language).toLowerCase()
}
$("#showinandroidbrowser").hide();
$("#showiniosbrowser").hide();
$("#ss1").attr("src","images/xzai1-1.jpg");
$("#ss2").attr("src","images/xzai2.jpg");
$("#ss3").attr("src","images/xzai3.jpg");
$("#showiniosbrowser").css("height",jQuery(window).height());
$("#showinandroidbrowser").css("height",jQuery(window).height());
$(".swiper-container").css("height",jQuery(window).height()*/); if(Terminal.platform.android){
$("#download").attr("src","images/android.jpg");
$("#downloadurl").attr("href","http://download.chinahrt.com/app/rx_v3_2_2_20151014092004_CHINAHRT.apk");
if(Terminal.platform.weChat) {
//在浏览器中打开
$("#showinandroidbrowser").show();
$("#showiniosbrowser").hide();
}
} else if(Terminal.platform.iPhone || Terminal.platform.iPad ){
$("#downloadurl").attr("href","itms-services://action=download-manifest&url=https://m.chinahrt.com/rongxue/iphone/rxios_1.0.34.plist");
$("#download").attr("src","images/ios.png");
if(Terminal.platform.weChat){
//在safari中打开
$("#showiniosbrowser").show();
$("#showinandroidbrowser").hide();
}else{
if(Terminal.platform.isiOS9){
//iOS9的使用教程
$("#showiniosbrowser").hide();
$("#showinandroidbrowser").hide();
$(".swiper-container").show();
$("#ss1").attr("src","images/02.jpg");
$("#ss2").attr("src","images/03.jpg");
$("#ss3").attr("src","images/04.jpg");
$(".swiper-container").css("height",jQuery(window).height()); $("#ss3").click(function(){
$("#ss1").attr("src","images/xzai1-1.jpg");
$("#ss2").attr("src","images/xzai2.jpg");
$("#ss3").attr("src","images/xzai3.jpg");
mySwiper.swipeTo(,,false);
$("#ss3").unbind("click");
$("#download").show();
$(".swiper-container").css("height",jQuery(window).height()*/); });
$("#download").hide(); }
}
} }); </script>

iphone手机端图片错位修正的js代码的更多相关文章

  1. 使用localResizeIMG3+WebAPI实现手机端图片上传

    前言 惯例~惯例~昨天发表的使用OWIN作为WebAPI的宿主..嗯..有很多人问..是不是缺少了什么 - - 好吧,如果你要把OWIN寄宿在其他的地方...代码如下: namespace Conso ...

  2. 外贸建站之图片预加载JS代码分享

    外贸建站之图片预加载JS代码分享 function preloadimg() { setTimeout(function() { new Image().src = "images/2017 ...

  3. 手机端图片预览和缩放js

    转至:http://blog.sina.com.cn/s/blog_c342e3090102vcxu.html 1.手机端的图片选择和预览 <input type="file" ...

  4. megapix-image插件 使用Canvas压缩图片上传 解决手机端图片上传功能的问题

    最近在弄微信端的公众号.订阅号的相关功能,发现原本网页上用的uploadify图片上传功能到手机端有的手机类型上就不能用了,比如iphone,至于为啥我想应该不用多说了吧(uploadify使用fla ...

  5. 自动判断PC端、手机端跳往不同的域名JS实现代码

    输入相同域名,在pc端和移动端会出现不同的页面效果,一种是用栅格系统实现自适应, 更多的是设计两套不同的模板和两个二级域名或者一个主域名和一个二级域名(就是有区别就可以了); js代码判断浏览器的用户 ...

  6. 【转】自动识别是手机端还是pc端只用一行代码就搞定

    <script type="text/javascript"> var mobileAgent = new Array("iphone", &quo ...

  7. 图片左右滚动的js代码

    html代码 <div class="demo" id="demo" style="overflow:hidden; width:660px; ...

  8. js动态改变图片热区坐标,手机端图片热区自适应

    <img id='banner1' src="images/banner.jpg" usemap="#banner" border="0&quo ...

  9. js手机端图片弹出方法

    1 $("img").click(function(){ //获取窗口可视大小 var width=$(window).width(); var height=$(window). ...

随机推荐

  1. 判断Python输入是否为数字

    在接收raw_input方法后,判断接收到的字符串是否为数字 例如: str = raw_input("please input the number:") if str.isdi ...

  2. C语言初学 计算三角形面积问题

    #include<stdio.h> #include<math.h> #include<stdlib.h> int main() { float a,b,c,s,a ...

  3. laravel跟jquery之间传输json数据

    laravel代码: public function test(){ $arr = ["test1"=>"1","test2"=> ...

  4. logstash 利用drop 丢弃过滤日志

    input { stdin { } } filter { grok { match => ["message","\s*%{TIMESTAMP_ISO8601}\s ...

  5. Ushare应用

    Ushare应用 Openwrt 系统功能强大,主要优势在于其开放性和可扩展性,Openwrt 安装ushare后,可将路由器变身为一个功能强大的家庭upnp流媒体服务器! 打开网上邻居,会显示发现u ...

  6. Paint House II 解答

    Question There are a row of n houses, each house can be painted with one of the k colors. The cost o ...

  7. Oracle insert update 时间处理

    24小时表示方法:to_date(’ ::’,’yyyy-mm-dd hh24:mi:ss’) 12小时表示方法:to_date(’ ::’,’yyyy-mm-dd hh:mi:ss’) ','S75 ...

  8. 删除ubuntu旧内核

    ubuntu的内核经常升级,而老内核并不自动卸载.时间长了,就有一大堆内核垃圾,需要我们手动去清理. 先用uname -a 查看当前内核版本: xzc@xzc-HP-ProBook-4446s:~$ ...

  9. .NET 面试题(2)

    61.Application .Cookie和 Session 两种会话有什么不同? 1.Application 储存在服务端,没有时间限制,服务器关闭即销毁(前提是自己没写销毁方法) 2.Sessi ...

  10. iOS 使用pods报错问题 pod --version

    错误信息如下 find_spec_for_exe': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException) from /Us ...