mwwdfl 发布的文章

获取屏幕宽度,resize:窗口大小改变时触发
function tishi(){

var one = document.body.clientWidth;
var wid = (one-1000)/2-50;
if(wid>=0){
    $('.left-tishi').css('left',wid+'px');
}else{
    $('.left-tishi').css('left','10px');
}

}
tishi();
$(window).resize(function(){
tishi();
});

遇到三个问题:
一、图片保存失败:给attchement777权限;
二、sql语句导入失败:来源不同,我用的是Navicat,sql文件是phpmyadmin导出的,这俩竟然不通。
三、微信支付配置正确,支付时页面没有付款显示,充值时也没有付款显示,是因为data目录没有777权限,要读取/data/sysset/sysset_你的uniacid文件来判断你有没有开启哪些支付的

css的active属性在安卓和ios上是不兼容的,苹果手机是识别不了的,
可以用js的鼠标移入事件或者定义以下:
var a = document.getElementsByTagName('a');
for(var i = 0; i < a.length; i++)
{
a[i].addEventListener('touchstart',function(){},false);
}
即可

text-overflow:ellipsis;
white-space:nowrap;
overflow:hidden;
text-overflow是否显示省略标记。并不具备其它的样式属性定义。要实现溢出时产生省略号的效果。还必须定义:强制文本在一行内显示(white-space:nowrap)及溢出内容为隐藏(overflow:hidden)。只有这样才能实现溢出文本显示省略号的效果。
一、仅定义text-overflow:ellipsis; 不能实现省略号效果。  
二、定义text-overflow:ellipsis; white-space:nowrap; 同样不能实现省略号效果  
三、同时应用: text-overflow:ellipsis; white-space:nowrap; overflow:hidden; 可实现所想要得到的溢出文本显示省略号效果:

手机屏幕同样有效
function wapWeb(){
document.write(
"屏幕分辨率为:"+screen.width+"*"+screen.height

"屏幕可用大小:"+screen.availWidth+"*"+screen.availHeight

"网页可见区域宽:"+document.body.clientWidth

"网页可见区域高:"+document.body.clientHeight

"网页可见区域宽(包括边线的宽):"+document.body.offsetWidth

"网页可见区域高(包括边线的宽):"+document.body.offsetHeight

"网页正文全文宽:"+document.body.scrollWidth

"网页正文全文高:"+document.body.scrollHeight

"网页被卷去的高:"+document.body.scrollTop

"网页被卷去的左:"+document.body.scrollLeft

"网页正文部分上:"+window.screenTop

"网页正文部分左:"+window.screenLeft

"屏幕分辨率的高:"+window.screen.height

"屏幕分辨率的宽:"+window.screen.width

"屏幕可用工作区高度:"+window.screen.availHeight

"屏幕可用工作区宽度:"+window.screen.availWidth
);
}