1.<BODY>
<script language="javascript">
function ShowImage(path){
document.all.divShow.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = path
}
function test(){
document.all.showimg.src=document.all.file1.value
}
</script>
2.<INPUT style="Z-INDEX: 101LEFT: 232pxPOSITION: absoluteTOP: 272px" type="file"onchange="ShowImage(this.value)">
<div id="divShow" style="FILTER:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image)WIDTH:274pxHEIGHT:100px">
<input type="file" id="file1" onchange="test()">
<img id="showimg" style="width:200pxheight:200px">
首先,设置在网页中显示文本的格式,文本的高度为100像素,宽度为280像素。2、定义显示文本的字体大小为22像素,离左侧和右侧的距离设置为自动,离顶部的距离设置为15像素。
3、用font标签在网页中插入要显示的文本。
4、由于显示的文本内容是动态控制的,所以设置一个标识符poemsi,用来动态表示显示的诗句。
5、然后,在网页中插入一个按钮。
6、按钮的高度为33像素,宽度为100像素,离左侧和右侧的距离为自动,离顶部的距离为20像素。
7、用type属性,定义按钮的类型为button。
8、定义按钮的标签为显示,单击后执行的函数为show。
9、按钮的背景色值为#aaeded,字体大小为20像素