纯JS操作获取桌面路径方法
//active 控件获取当前用户的桌面的路径的方法
var wsh = new ActiveXObject("wscript.shell");
listall(wsh.SpecialFolders("Desktop"));
function listall(imagePath){
// active 控件读取桌面指定名称图片的方法
var fso=new ActiveXObject("Scripting.FileSystemObject");
var file1 = fso.getFile(imagePath+'\\zp.bmp');
var src="<img src=\""+file1+"\"/>";
document.getElementById('certPicId').innerHTML = src;
}
纯JS操作获取桌面路径方法的更多相关文章
- js操作html的基本方法
刚学了js操作html的基本方法,在写代码过程中,有很多格式不规范,忘记加双引号尤其重要,通常这 样的错误很容易范,并且这种错误很难找.随着代码学习量越来越多,很多写法容易搞混.今天记录一下,以便后期 ...
- JS操作字符串常用的方法
JS操作String对象的方法 charAt(index):返回指定索引处的字符串charCodeAt(index):返回指定索引处的字符的Unicode的值concat(str1,str2,...) ...
- JS操作数组常用的方法
JS操作Array对象的方法 concat(arr1,arr2,...):连接数组indexOf(value):返回数组中value的第一个索引join(separator):将数组中所有的元素连接由 ...
- js中获取项目路径的小插件
//立即执行的js (function() { //获取contextPath var contextPath = getContextPath(); //获取basePath var basePat ...
- Node.js express获取参数有三种方法
express获取参数有三种方法:官网介绍如下 Checks route params (req.params), ex: /user/:id Checks query string params ( ...
- JQuery和JS操作LocalStorage/SessionStorage的方法(转)
出处:http://blog.csdn.net/djzhao627/article/details/50747628 首先说一下LocalStorage和SessionStorage LocalSto ...
- Python获取桌面路径
第一种: import winreg def get_desktop(): key = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r'Software\Micr ...
- js(jQuery)获取时间的方法及常用时间类搜集
获取时间的方法及常用时间类都是大家经常使用的,在本文为大家整理了一些,个人感觉还比较全,感兴趣的朋友可以收集下 复制代码代码如下: $(function(){ var mydate = new D ...
- java获取桌面路径的方法
FileSystemView fsv = FileSystemView.getFileSystemView(); File com=fsv.getHomeDirectory(); System.out ...
随机推荐
- 使用SpringMVC解决Ajax跨域问题
package com.mengyao.system.filter; import java.io.IOException; import javax.servlet.FilterChain; imp ...
- MS笔试中的一个关于函数返回的“小”题
Which of following C++ code is correct ? A. int f() { ); return *a; } B. int *f() { int a[3] = {1,2, ...
- webdriver函数
import sys; print('%s %s' % (sys.executable or sys.platform, sys.version)) PyDev console: starting. ...
- 基于 Windows 7 的计算机的可用内存可能低于安装内存
https://support.microsoft.com/zh-cn/kb/978610 症状 在运行 Windows 7 的计算机上,可用内存 (RAM) 可能会低于安装内存. 例如,32 位版本 ...
- 转:布局【ViewGroup】
转: http://www.cnblogs.com/leehyuan/p/3389527.html 像素单位的变化:是用dip,而不是px,主要用于宽高的设置 在Android中支持的描述大小区域的类 ...
- kernel_read【转】
转自:http://blog.csdn.net/echoisland/article/details/7101097http://lxr.oss.org.cn/source/fs/exec.c 798 ...
- wscript运行js文件
wscript运行js文件 http://www.cnblogs.com/jxgxy/archive/2013/09/20/3330818.html wscript运行js文件 wscript ad ...
- git error: unable to write file xxx,git fatal: unable to write new index file
执行git checkout -- . error: unable to write file mobile/manifest.jsonfatal: unable to write new index ...
- YSlow安装兼容的环境版本
YSlow:网站性能评分工具 1.安装 Firefox 282.安装 Firebug1.2.83.安装 YSlow3.1.8.1
- 白话TCP三次握手
在TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接. 第一次握手:建立连接时,客户端发送syn包(syn=j)到服务器,并进入SYN_SEND状态,等待服务器确认: 第二次握 ...