1)<html>
<head>
<script language="javascript">
function setHeight()
{
var x=document.p_w_picpaths
x[0].height="250"
}
</script>
</head>
<body>
<img src="/p_w_picpaths/NullPic.gif" width="107" height="98" />
<form>
<input type="button" value="Change height">
</form>
</body>
</html>
2)<html>
<head>
<script language="JavaScript">
function setSrc()
{
var x=document.p_w_picpaths
x[0].src="/p_w_picpaths/NullPic.gif"
}
</script>
</head>
<body>
<img src="/p_w_picpaths/NullPic.gif" width="107" height="98" />
<form>
<input type="button" value="Change p_w_picpath">
</form>
</body>
</html>
3)<html>
<head>
<script language="JavaScript">
function setWidth()
{
var x=document.p_w_picpaths
x[0].width="300"
}
</script>
</head>
<body>
<img src="/p_w_picpaths/NullPic.gif" width="107" height="98" />
<form>
<input type="button" value="Change width">
</form>
</body>
</html>
<head>
<script language="javascript">
function setHeight()
{
var x=document.p_w_picpaths
x[0].height="250"
}
</script>
</head>
<body>
<img src="/p_w_picpaths/NullPic.gif" width="107" height="98" />
<form>
<input type="button" value="Change height">
</form>
</body>
</html>
2)<html>
<head>
<script language="JavaScript">
function setSrc()
{
var x=document.p_w_picpaths
x[0].src="/p_w_picpaths/NullPic.gif"
}
</script>
</head>
<body>
<img src="/p_w_picpaths/NullPic.gif" width="107" height="98" />
<form>
<input type="button" value="Change p_w_picpath">
</form>
</body>
</html>
3)<html>
<head>
<script language="JavaScript">
function setWidth()
{
var x=document.p_w_picpaths
x[0].width="300"
}
</script>
</head>
<body>
<img src="/p_w_picpaths/NullPic.gif" width="107" height="98" />
<form>
<input type="button" value="Change width">
</form>
</body>
</html>
转载于:https://blog.51cto.com/hzzfb/1049806