宝安网站建设

表单通过ajax上传图片文件,无刷新显示缩略图

表单通过ajax上传图片文件,无刷新显示缩略图

我们有时候上传表单时希望将表单中的文件提前上传,然后根据服务器返回的上传图片的路径,显示缩略图。如下图所示,选中文件即显示缩略图:如何实现呢?这里我们采用两种方法,第一种采用原

2018-12-07

网站开发制作宝安网站建设ajax上传图片

PHP封装的阿里短信函数,调用一行就实现功能

PHP封装的阿里短信函数,调用一行就实现功能

短信发送,是我们web开发网站经常使用到的而阿里短信也是我们经常使用的短信平台,不仅是稳定,而且靠谱现在直接封闭到一个函数里,方便调用,使用更方便下面就贴出代码吧 .clear:after{content:'\20';display:block;height:0;clear:both;visibility:hidden;} .yb_conct{position:fixed;z-index:9999999;top:200px;right:-127px;cursor:pointer;transition:all .3s ease;} .yb_bar ul li{width:180px;height:53px;font:16px/53px 'Microsoft YaHei';color:#fff;text-indent:54px;margin-bottom:3px;border-radius:3px;transition:all .5s ease;overflow:hidden;} .yb_bar .yb_top{background:#ff4a00 url(/public/assets/default/images/fixCont.png) no-repeat 0 0;} .yb_bar .yb_phone{background:#ff4a00 url(/public/assets/default/images/fixCont.png) no-repeat 0 -57px;} .yb_bar .yb_QQ{text-indent:0;background:#ff4a00 url(/public/assets/default/images/fixCont.png) no-repeat 0 -113px;} .yb_bar .yb_ercode{background:#ff4a00 url(/public/assets/default/images/fixCont.png) no-repeat 0 -169px;} .hd_qr{padding:0 29px 25px 29px;} .yb_QQ a{display:block;text-indent:54px;width:100%;height:100%;color:#fff;}