如何写出优雅的代码?

everything is null
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

JAVASCRIPT图片预览

Posted on 2007-11-14 17:08  灰色  阅读(790)  评论(0)    收藏  举报

<html>
<body>
<script type="text/javascript">

function Preview(imgFile)
{
document.getElementById("pic").filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgFile.value;

}
</script>

<input type="file" onchange="javascript:Preview(this);" /><br />
<div id="pic" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);width:400px;height:200px;"></div>
</body>
</html>