Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何在单击时放大iframe中的图像?_Javascript_Jquery_Html_Iframe - Fatal编程技术网

Javascript 如何在单击时放大iframe中的图像?

Javascript 如何在单击时放大iframe中的图像?,javascript,jquery,html,iframe,Javascript,Jquery,Html,Iframe,我不知道在我的iframe中放大图像的最佳方法。这是我的密码 <table id="offer"> <tbody> <tr> <td class="frame"><iframe id="content1" name="content1" src="/uploads/images/1.jpg" scrolling="no" frameborder="0"></iframe></td> <td cl

我不知道在我的iframe中放大图像的最佳方法。这是我的密码

 <table id="offer">
 <tbody>
 <tr>
<td class="frame"><iframe id="content1" name="content1" src="/uploads/images/1.jpg"    scrolling="no" frameborder="0"></iframe></td>
<td class="o1">
<div class="p2"><a href="/uploads/images/1.jpg" target="content1"><img src="/uploads/images/1.jpg" alt="" width="320" height="173" /></a></div>
</td>
<td class="o2">
<div class="p3"><a href="/uploads/images/2.jpg" target="content1"><img src="/uploads/images/2.jpg" alt="" /></a></div>
</td>
<td class="o3">
<div class="p4"><a href="/uploads/images/3.jpg" target="content1"><img src="/uploads/images/3.jpg" alt="" /></a></div>
</td>
</tr>
</tbody>
</table>
现在它是这样工作的:当我点击较小的ImageClass p1、p2、p3时,它会将这个图像加载到iframe中。 但是第二步,我不能做的是通过点击放大这个加载的图像。
有没有简单的方法?请帮帮我。

你有我们能看到的关于这个的资料吗?是这样的。但我不知道如何在fiddle中添加图像;这样做,但它会改变你的图像,所以我给你的建议是,首先加载你的图像,应用scale0.5,然后在单击时增加scale1。你尝试使用iframe这样做有什么特别的原因吗?你到底想在这里创造什么?也许有更好的方法来执行这个。谢谢,我没有注意到溢出:隐藏在我的css中。但即使我通过变换缩放图像,如何将其与单击事件连接起来?