使用<input type="image" src="...">标签会引发页面刷新的问题

使用<input type="image">标签时,如果是放在了form表单内部,就会引起页面刷新的问题,解决办法很简单

<input type="image" src="..." name="..." onclick="test();return false;">

只需要在触发的函数后面加上return false;就可以完美解决页面刷新的问题

原文地址:https://www.cnblogs.com/RunningSir/p/7028740.html