请问下面的这个代码怎么运用,放在txt改成htm打开了,想在淘宝上看评论,鼠标移动到图片可以自动放大。打开htm发现可以放大,其他网页上的图片没有放大,没有变化。求指导

把鼠标移动到图片上图片就会放大显示_weixin_30871701的博客-CSDN博客 <html><head><script type="text/javascript">function moveover(){document.getElementById('image').width="200"document.getElementById('image').height="360"}function moveback(){document.... https://blog.csdn.net/weixin_30871701/article/details/97539432?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522163171281816780262562863%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=163171281816780262562863&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduend~default-1-97539432.first_rank_v2_pc_rank_v29&utm_term=%E9%BC%A0%E6%A0%87%E6%94%BE%E5%88%B0%E5%9B%BE%E7%89%87%E4%B8%8A%E8%87%AA%E5%8A%A8%E6%94%BE%E5%A4%A7%0A++++++++++++++++++++++++++&spm=1018.2226.3001.4187

得给所有图片都添加上变大的事件,他这里只是给你示例

不过这种方法放大会影响到布局的,没啥用

img

我改了一下可以了 。它方法用错了


<html>

<head>
   
</head>

<body>

    <b>请把鼠标移动到图像上:</b><br />
    <img id="image" src="https://ss1.baidu.com/-4o3dSag_xI4khGko9WTAnF6hhy/baike/s%3d600%3bq%3d50/sign=c78810f334d12f2eca05ad607ff9a45f/8326cffc1e178a8205650e84f403738da977e8bd.jpg" tppabs="http://www.w3school.com.cn/i/eg_bulbon.gif"
           width="100" height="180"   onmouseover="moveover()"  onmouseout="moveback()"/>

</body>
<script type="text/javascript">
    function moveover() {
        document.getElementById('image').width = "200"
        document.getElementById('image').height = "360"
    }
    function moveback() {
        document.getElementById('image').width = "100"
        document.getElementById('image').height = "180"
    }
</script>
</html>