<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script>
window.onload=function()
{
/*var divpostion = document.getElementById("bu1");
divpostion.style.position="absolute";
divpostion.style.top=700;
divpostion.style.left=700;*/
}
function show()
{
var divdo = document.getElementById("a");
divdo.innerHTML="<img src='xx.jpg' id='im'>"
var dis =document.getElementById("im");
dis.height=300;
dis.width=300;
}
function big()
{
var di =document.getElementById("im");
di.height= di.height+100;
di.width=di.height+100;
}
function ss()
{
var di =document.getElementById("im");
di.height= di.height-100;
di.width=di.height-100;
}
</script>
</head>
<body>
<div id="a">xxxx</div>
<form>
<input type="button"onclick="show()">
<input type="button" value="放大"onclick="big();" id="bu1" style="position: absolute;top: 600px;left: 500px" >
<input type="button" value="缩小"onclick="ss();" id="bu2"style="position: absolute;top: 600px;left: 700px" >
<input>
</form>
</body>
</html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<script>
window.onload=function()
{
/*var divpostion = document.getElementById("bu1");
divpostion.style.position="absolute";
divpostion.style.top=700;
divpostion.style.left=700;*/
}
function show()
{
var divdo = document.getElementById("a");
divdo.innerHTML="<img src='xx.jpg' id='im'>"
var dis =document.getElementById("im");
dis.height=300;
dis.width=300;
}
function big()
{
var di =document.getElementById("im");
di.height= di.height+100;
di.width=di.height+100;
}
function ss()
{
var di =document.getElementById("im");
di.height= di.height-100;
di.width=di.height-100;
}
</script>
</head>
<body>
<div id="a">xxxx</div>
<form>
<input type="button"onclick="show()">
<input type="button" value="放大"onclick="big();" id="bu1" style="position: absolute;top: 600px;left: 500px" >
<input type="button" value="缩小"onclick="ss();" id="bu2"style="position: absolute;top: 600px;left: 700px" >
<input>
</form>
</body>
</html>