下面给大家分享html5点击弹出图片,分为前台代码和js代码,具体内容如下所示:
前台代码:
<a href="javascript:;" onclick="repeat()"> <div id="modal_volume" style="position: fixed; text-align: center; width: 100%; height: 100%; top: 0; z-index: 9999; display: none;"> <table style="width: 100%; height: 100%;"> <tr> <td align="center" style=""> <div style="width: 900px; position: relative"> <a href="zjb_enroll?course=专业课提高班"> <img src="Content/images/tanchuang.jpg" /></a> <a href="javascript:$('#modal_volume').fadeOut();" style="display: block; width: 45px; height: 45px; position: absolute; right: 11px; top: 10px; z-index: 2"></a> </div> </td> </tr> </table> </div>
js代码
<script> function repeat() { $('#modal_volume').fadeIn(); } </script>