js调用iOS系统相册问题( input type=“file”在iOS上调用)

JavaScript021

js调用iOS系统相册问题( input type=“file”在iOS上调用),第1张

最近一个项目用了纯h5 页面  当js调用系统相册时候,弹出的框 显示的是这样的

但是需要的是这样的

做法是这样的

延伸下(下面这个我没有验证过,但是看起来 就是对的啊)

iOS 应用程序内切换语言 中英文切换

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/htmlcharset=gb2312" />

<title>jQuery实现的点击图片放大且在当前页面查看原图丨芯晴网页特效丨CsrCode.Cn</title>

<style type="text/css">

div, ul, li {

margin: 0px

padding: 0px

list-style-type: none

}

#Over {

position: absolute

width: 100%

z-index: 100

left: 0px

top: 0px

}

.img {

width:90%

background-color: #FFF

height: 90%

padding: 3px

border-top-width: 1px

border-right-width: 1px

border-bottom-width: 1px

border-left-width: 1px

border-top-style: solid

border-right-style: solid

border-bottom-style: solid

border-left-style: solid

}

.content {

text-align: center

width: 200px

height:150px

margin-right: auto

margin-left: auto

}

.EnlargePhoto {

cursor: pointer

}

.TempContainer {

position: absolute

z-index: 101

margin-right: 0px

margin-left: 0px

text-align: center

width: 100%

cursor: pointer

}

</style>

</head>

<script type="text/javascript" src="/images/jquery-1.6.2.min.js"></script>

<script type="text/javascript">

$(document).ready(function(e) {

var ImgsTObj = $('.EnlargePhoto')//class=EnlargePhoto的都是需要放大的图像

if(ImgsTObj){

$.each(ImgsTObj,function(){

$(this).click(function(){

var currImg = $(this)

CoverLayer(1)

var TempContainer = $('<div class=TempContainer></div>')

with(TempContainer){

appendTo("body")

css('top',currImg.offset().top)

html('<img border=0 src=' + currImg.attr('src') + '>')

}

TempContainer.click(function(){

$(this).remove()

CoverLayer(0)

})

})

})

}

else{

return false

}

//====== 使用/禁用蒙层效果 ========

function CoverLayer(tag){

with($('#Over')){

if(tag==1){

css('height',$(document).height())

css('display','block')

css('opacity',0.9)

css("background-color","#000")

}

else{

css('display','none')

}

}

}

})

</script>

<body>

<div class="content">

<IMG class="img EnlargePhoto" src="/images/m03.jpg"><br /><br />

<IMG class="img EnlargePhoto" src="/images/m04.jpg"><br /><br />

</div>

</body>

</html>

<br>第一次运行本代码,请刷新一下本页面先~~<br>所需js文件:<a href="/images/jquery-1.6.2.min.js" target=_blank>jquery-1.6.2.min.js</a><br><hr><p align="center"><font color=black>本特效由 <a href="http://www.CsrCode.cn" target="_blank">芯晴网页特效</a>丨CsrCode.Cn 收集于互联网,只为兴趣与学习交流,不作商业用途。来源:源码爱好者</font></p>