禁止手机缩放代码

    <meta content="width=device-width, 
initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />

禁止手机页面缩放代码,放在head标签里

$.ajaxFileUpload 不进success,前面加domain这一句

document.domain = 'localhost';        
$.ajaxFileUpload(            {                
url: "<?php echo base_url('index.php/Niche/do_upload')?>", //用于文件上传的服务器端请求地址                
secureuri: false, //是否需要安全协议,一般设置为false                
fileElementId:   "images", //文件上传域的ID                
dataType: 'json', //返回值类型 一般设置为json                
success: function (data)  //服务器成功响应处理函数                
{
//                    $("#img1").attr("src", data.imgurl);
//                    if (typeof (data.error) != 'undefined') {
//                        if (data.error != '') {
//                            alert(data.error);
//                        } else {
//                            alert(data.msg);
//                        }
//                    }                    alert('图片上传成功');                
},                error: function (data, e)//服务器响应失败处理函数                
{                    alert(e);                }            }        )
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s