2012
2
2
<script type="text/javascript">// <![CDATA[
$(window).bind('resize load', function(){
$("html").css("zoom" , $(window).width()/640 );
});
// ]]></script>
var portraitWidth,landscapeWidth;
$(window).bind("resize", function(){
if(Math.abs(window.orientation) === 0){
if(/Android/.test(window.navigator.userAgent)){
if(!portraitWidth)portraitWidth=$(window).width();
}else{
portraitWidth=$(window).width();
}
$("html").css("zoom" , portraitWidth/320 );
}else{
if(/Android/.test(window.navigator.userAgent)){
if(!landscapeWidth)landscapeWidth=$(window).width();
}else{
landscapeWidth=$(window).width();
}
$("html").css("zoom" , landscapeWidth/320 );
}
}).trigger("resize");
<script>
var meta = document.createElement('meta');
meta.setAttribute(<strong><span style="color: #ff0000;">'<a><span style="color: #ff0000;">name</span></a>'</span></strong>, 'viewport');
meta.setAttribute('content', 'width=initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, width=device-width, user-scalable=0');
document.getElementsByTagName('head')[0].appendChild(meta);
</script>
