javascript onclick happening on page load(页面加载时发生的javascript onclick)
问题描述
我正在尝试制作一个简单的 Javascript 函数,以便在单击图像时打开一个带有更大图像的窗口.发生的情况是此测试警报在页面加载时弹出,然后当我单击图像时什么也不做.这是代码
I'm trying to make a simple Javascript function to open a window with a bigger image when an image is clicked on. What happens is this test alert pops up on the page load and then does nothing when i click on the image. Here is the code
推荐答案
试试这个
这篇关于页面加载时发生的javascript onclick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!