当前位置: 首页 > 图文教程 > 网络编程 > ASP > 几个对图形进行动态处理的dhtml代码

ASP
ASP编程中15个非常有用的例子 (二)
ASP与JSP的比较(一)
ASP与JSP的比较(二)
ASP中五种连接数据库的方法
从ASP调用SQL中的图像
用排序串字段实现树状结构(例程:连接字串)
用排序串字段实现树状结构(例程:删除贴子)
用排序串字段实现树状结构(例程:回复表单)
用排序串字段实现树状结构(例程:显示贴子内容)
用排序串字段实现树状结构(例程:显示树)
用排序串字段实现树状结构(存储过程)
用排序串字段实现树状结构(库结构)
用排序串字段实现树状结构(原理)
remote script文档(转载自微软)(一)
remote script文档(转载自微软)(二)
remote script文档(转载自微软)(三)
remote script文档(转载自微软)(四)
remote script文档(转载自微软)(五)
remote script文档(转载自微软)(六)
remote script文档(转载自微软)(七)

ASP 中的 几个对图形进行动态处理的dhtml代码


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 70 ::
收藏到网摘: n/a

  1)<html>
<head>

<script language="JavaScript">
function setHeight()
{
var x=document.images
x[0].height="250"
}
</script>

</head>
<body>

<img src="/upload/tech/20091103/20091103100820_08b255a5d42b89b0585260b6f2360bdd.gif"" width="107" height="98" />

<form>
<input type="button" onclick="setHeight()" value="Change height">
</form>

</body>
</html>

2)<html>
<head>

<script language="JavaScript">
function setSrc()
{
var x=document.images
x[0].src="/upload/tech/20091103/20091103100821_5fd0b37cd7dbbb00f97ba6ce92bf5add.gif""
}
</script>

</head>
<body>

<img src="/upload/tech/20091103/20091103100820_08b255a5d42b89b0585260b6f2360bdd.gif"" width="107" height="98" />

<form>
<input type="button" onclick="setSrc()" value="Change image">
</form>

</body>
</html>
3)<html>
<head>

<script language="JavaScript">
function setWidth()
{
var x=document.images
x[0].width="300"
}
</script>

</head>
<body>

<img src="/upload/tech/20091103/20091103100820_08b255a5d42b89b0585260b6f2360bdd.gif"" width="107" height="98" />

<form>
<input type="button" onclick="setWidth()" value="Change width">
</form>

</body>
</html>

注意,图形文件换成自己的文件,试试,不错吧