fso获取本地目录显示图片
来源:互联网 发布:linux安装ipython 编辑:程序博客网 时间:2024/09/21 09:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" id="h"name="h"class="h">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
// JavaScript
var dizhi,f,fc,jso,fso,wenjianming,name,ci,shu=0,jqu="[{",jq="},{",jiequq,jiequw,jiequa,jiequ;
$(function(){
$("body div").click(function(){
name=$(this).attr("id");
if(name=="dian"){
wenjianming = $("#b1").val();
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFolder(wenjianming);
fc = new Enumerator(f.files);jso= jqu;
for (;!fc.atEnd();fc.moveNext())
{
dizhi = fc.item()+"";
jiequ = dizhi.substring(wenjianming.length+1);
jso+="\"name\":\""+jiequ+"\"";jso+=jq;
}
jso+="}]"; $("#d").append(jso);
ci=eval(jso);
jiequq =dizhi.substring(1,-2);
jiequw =dizhi.substring(2,wenjianming.length+1);
jiequa = "file:///"+jiequq+"|"+jiequw;
$("#j").html("<img id=\"t\"name=\"t\"class=\"t\" src=\""+jiequa+""+ci[0].name+"\">");
}
if(name=="y")
{
if(shu==ci.length-1){
shu=0;$("#d").append("第0幅/共"+(ci.length-1)+"幅");
}
shu++;
$("#d").html("第"+shu+"幅/共"+(ci.length-1)+"幅");
$("#j").html("<img id=\"t\"name=\"t\"class=\"t\" src=\""+jiequa+""+ci[shu].name+"\">");
}
if(name=="z")
{
if(shu==0){
shu=ci.length;
$("#d").html("第"+(ci.lengtjh-1)+"幅/共"+(ci.length-1)+"幅");
}
shu--;
$("#d").html("第"+shu+"幅/共"+(ci.length-1)+"幅");
$("#j").html("<img id=\"t\"name=\"t\"class=\"t\" src=\""+jiequa+""+ci[shu].name+"\">");
}
});
});
<html xmlns="http://www.w3.org/1999/xhtml" id="h"name="h"class="h">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
// JavaScript
var dizhi,f,fc,jso,fso,wenjianming,name,ci,shu=0,jqu="[{",jq="},{",jiequq,jiequw,jiequa,jiequ;
$(function(){
$("body div").click(function(){
name=$(this).attr("id");
if(name=="dian"){
wenjianming = $("#b1").val();
fso = new ActiveXObject("Scripting.FileSystemObject");
f = fso.GetFolder(wenjianming);
fc = new Enumerator(f.files);jso= jqu;
for (;!fc.atEnd();fc.moveNext())
{
dizhi = fc.item()+"";
jiequ = dizhi.substring(wenjianming.length+1);
jso+="\"name\":\""+jiequ+"\"";jso+=jq;
}
jso+="}]"; $("#d").append(jso);
ci=eval(jso);
jiequq =dizhi.substring(1,-2);
jiequw =dizhi.substring(2,wenjianming.length+1);
jiequa = "file:///"+jiequq+"|"+jiequw;
$("#j").html("<img id=\"t\"name=\"t\"class=\"t\" src=\""+jiequa+""+ci[0].name+"\">");
}
if(name=="y")
{
if(shu==ci.length-1){
shu=0;$("#d").append("第0幅/共"+(ci.length-1)+"幅");
}
shu++;
$("#d").html("第"+shu+"幅/共"+(ci.length-1)+"幅");
$("#j").html("<img id=\"t\"name=\"t\"class=\"t\" src=\""+jiequa+""+ci[shu].name+"\">");
}
if(name=="z")
{
if(shu==0){
shu=ci.length;
$("#d").html("第"+(ci.lengtjh-1)+"幅/共"+(ci.length-1)+"幅");
}
shu--;
$("#d").html("第"+shu+"幅/共"+(ci.length-1)+"幅");
$("#j").html("<img id=\"t\"name=\"t\"class=\"t\" src=\""+jiequa+""+ci[shu].name+"\">");
}
});
});
0 0
- fso获取本地目录显示图片
- 获取本地图片并显示
- 保存图片到本地目录和获取
- 保存图片到本地目录和获取
- 用FSO读取本地文件夹中的图片
- 获取本地所有图片显示并可多选的本地相册
- [WinForm]动态显示本地目录图片与悬浮窗
- android 拍照及本地获取图片,并显示
- Qt 获取网络gif图片并保存到本地显示
- 一个纯FSO写的类:获取图片width,height
- jsp显示本地图片
- jsp显示本地图片
- jsp显示本地图片
- JSP:显示本地图片
- js显示本地图片
- picasso 显示本地图片
- jsp显示本地图片
- 获取本地图片代码
- XLOCALE
- 原标题:主人没地方养,无奈送给水族馆
- C++ 中的auto_ptr智能指针
- CLIMITS
- 2014年Java值得期待的五大理由
- fso获取本地目录显示图片
- LIMITS.H
- MFC ACTIVEX error MSB3073 代码为 3
- Aop的jdk动态代理
- 详解ruby的attr_accessor和cattr_accessor
- WebKit是什么
- 工作笔记之--ordupdate
- CSTRING
- 创业是一种进取突破的心态,不是形式