<var id="xvh3p"><noframes id="xvh3p"><var id="xvh3p"></var><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing>
<var id="xvh3p"><strike id="xvh3p"><var id="xvh3p"></var></strike></var><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<span id="xvh3p"><noframes id="xvh3p"><dl id="xvh3p"></dl>
<span id="xvh3p"><noframes id="xvh3p">
<dl id="xvh3p"><noframes id="xvh3p">
<listing id="xvh3p"><noframes id="xvh3p"><listing id="xvh3p"><strike id="xvh3p"><listing id="xvh3p"></listing></strike></listing><th id="xvh3p"><strike id="xvh3p"><th id="xvh3p"></th></strike></th>
<th id="xvh3p"><strike id="xvh3p"></strike></th>
<dl id="xvh3p"><noframes id="xvh3p">
<th id="xvh3p"><noframes id="xvh3p">

观点

互联网+时代,说建站,谈运营与网络营销

织梦后台缩略图异步上传原理

时间:2020-12-09

上传主要代码如下:
<input name="picname" type="text" id="picname" style="width:240px" />
<input type="button"  value="本地上传" style="width:70px;cursor:pointer;" />
<iframe name='uplitpicfra' id='uplitpicfra' src='' width='200' height='200' style='display:none'></iframe>
<span class="litpic_span"><input name="litpic" type="file" id="litpic"  onChange="SeePicNew(this, 'divpicview', 'uplitpicfra', 165, 'article_add.php');" size="1" class='np coolbg'/></span>

看到最后一行代码,就可以发现他的上传实际上就是用的HTML最普通的file上传方法,把图层盖到button本地上传上面并把背景设为透明,看上去是一个button,实际上点击的却是file的浏览按钮。#litpic{ filter:alpha(opacity=00);-moz-opacity:.0;opacity:0.0;cursor:pointer;}
当用户选择一个图片后触发函数SeepicNew,这个函数在main.js中。然后通过这个JS创建表单需要的元素后提交,提交的对像是iframe,所以页面不会整个跳转。表单提交在archives_do.php文件中,这个文件用AdminUpload这个函数处理了表单的提交并返回相应的值来得到图片的处理结果。而AdminUpload这个函数是放在include/helper/upload.helper.php

0
首页
案例
关于
联系