单独使用CKFinder选择图片的方法

时间:2010-08-21    点击:80   
复制代码 代码如下:

<div>
<script type="text/javascript" src="../ckfinder/ckfinder.js"></script>
<script type="text/javascript">
function BrowseServer(inputId)
{
var finder = new CKFinder() ;
finder.basePath = '../ckfinder/'; //导入CKFinder的路径
finder.selectActionFunction = SetFileField; //设置文件被选中时的函数
finder.selectActionData = inputId; //接收地址的input ID
finder.popup() ;
}
//文件选中时执行
function SetFileField(fileUrl,data)
{
document.getElementById(data["selectActionData"]).value = fileUrl ;
}
</script>
<p>
<asp:TextBox ID="txtImgPath" runat="server"></asp:TextBox>
<input type="button" value=" 浏 览 " onclick="BrowseServer('<%=txtImgPath.ID %>');" />
</p>
</div>

注:CKFinder 2.0
下载地址:http://ckfinder.com/download
javascript中的float运算精度实例分析
Firebug入门指南(Firefox浏览器)
jquery插件之easing 动态菜单
url地址自动加#号问题说明
jquery中输入验证中一个不错的效果
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved