ASP常用函数 快速获取远程http文件大小:getRemoteFileSize()
作者:逸品 日期:2009-01-24
程序代码<%
Dim url,aSize
Url = "http://www.abc.com/download/xml.rar"
aSize = getRemoteFileSize(Url)
Response.Write Url & "<hr>" & aSize(0) & "<hr>" & aSize(1)
'---------------------------------------------------
Dim url,aSize
Url = "http://www.abc.com/download/xml.rar"
aSize = getRemoteFileSize(Url)
Response.Write Url & "<hr>" & aSize(0) & "<hr>" & aSize(1)
'---------------------------------------------------
js实现图片大小等比缩放
作者:逸品 日期:2008-10-20
程序代码function resize(thumbs_size) {
var max = thumbs_size.split('x');
var fixwidth = max[0];
var fixheight = max[1];
imgs = document.getElementsByTagName('img');
for(i=0;i<imgs.length;i++) {
w=imgs.width;h=imgs[i].height;
if(w>fixwidth) { imgs[i].width=fixwidth;imgs[i].height=h/(w/fixwidth);}
if(h>fixheight) { imgs[i].height=fixheight;imgs[i].width=w/(h/fixheight);}
imgs[i].style.cursor= "pointer";
imgs[i].onclick = function() { window.open(this.src);}
var max = thumbs_size.split('x');
var fixwidth = max[0];
var fixheight = max[1];
imgs = document.getElementsByTagName('img');
for(i=0;i<imgs.length;i++) {
w=imgs.width;h=imgs[i].height;
if(w>fixwidth) { imgs[i].width=fixwidth;imgs[i].height=h/(w/fixwidth);}
if(h>fixheight) { imgs[i].height=fixheight;imgs[i].width=w/(h/fixheight);}
imgs[i].style.cursor= "pointer";
imgs[i].onclick = function() { window.open(this.src);}
jQuery无限级改变字体大小
作者:逸品 日期:2008-08-20
程序代码 <script type="text/javascript">
$(function(){
$('a').click(function(){
var ele_fontSize = $("#text").css("font-size");
var textSize = parseFloat(ele_fontSize , 10); //得到数字,去掉字符串(单位)
var unit = ele_fontSize.slice(-2); //获取单位
$(function(){
$('a').click(function(){
var ele_fontSize = $("#text").css("font-size");
var textSize = parseFloat(ele_fontSize , 10); //得到数字,去掉字符串(单位)
var unit = ele_fontSize.slice(-2); //获取单位
