惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
J
Java Code Geeks
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
A
About on SuperTechFans
腾讯CDC
B
Blog RSS Feed
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Microsoft Azure Blog
Microsoft Azure Blog
D
Docker
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
F
Fortinet All Blogs
I
InfoQ
博客园 - 【当耐特】
美团技术团队
GbyAI
GbyAI
量子位
宝玉的分享
宝玉的分享
爱范儿
爱范儿
有赞技术团队
有赞技术团队
博客园 - Franky
L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志

博客园 - 刹那间我存在

一个可以放wordpress博客的PHP国外免费空间速度非常不错 重写alert,使用模态窗口强化alert。 - 刹那间我存在 - 博客园 利用 ASP.NET 的Timer 来实现的访问统计,感觉比较适合高访问量的网站 JavaScript 使用for(…in…)实现反射机制 给moz添加ie方法和属性,让firefox像IE一样编程 - 刹那间我存在 - 博客园 [原] 用 javascript 给你的博客增加运行代码功能 [原]ASP.NET 下生成的条形码。 网页中图片大小自动调整三种方法 - 刹那间我存在 - 博客园 同时支持三种事件模型 ASP调用.Net编写的动态库 - 刹那间我存在 - 博客园 整个表单元素禁用``` shtml精简教程 更改数据库所有者 BitComet超级优化设置 很酷的TOOLTip 今天得到了两个 Google Analytics 的邀请 CustomValidator 控件 千万数量级分页存储过程(带效果演示) 推荐一下免费的1G网络硬盘,非常另类
JS函数收藏
刹那间我存在 · 2006-04-06 · via 博客园 - 刹那间我存在

 ///自动调整图片大小
<script language=javascript>
function propersize(obj,width,height)
{
var width1=obj.width;
var height1=obj.height;           
var width2=width;           
var height2=height;           
var h=height1/height2;
var w=width1/width2;

  if(h>w)
  {
   obj.height=height2;         
   obj.width=width1*height2/height1;          
  }
  else
  {
   obj.width=width2;          
   obj.height=height1*width2/width1;         
  }
}
</script>