x
 
<!DOCTYPE html>
<html>
<body>
<embed id="myEmbed" src="/i/photo/tulip.jpg" width="300">
<p>单击该按钮可将图像的宽度更改为 500 像素。</p>
<button onclick="myFunction()">试一试</button>
<script>
function myFunction() {
  document.getElementById("myEmbed").width = "500";
}
</script>
</body>
</html>