本文实例讲述了js实现C#的StringBuilder效果。分享给大家供大家参考,具体如下:
/*
##################### DO NOT MODIFY THIS HEADER #####################
# Title: StringBuilder Class #
# Descr iption: Simulates the C# StringBuilder Class in Javascr ipt. #
本文实例讲述了JS实现按比例缩放图片的方法。分享给大家供大家参考,具体如下:
js版本:
function resizeImage(obj, MaxW, MaxH)
{
var imageObject = obj;
var state = imageObject.readyState;
if(state!='complete')
{
setTimeout("resizeImage("+imageObject+","+MaxW+","+MaxH+")",50);
return;