单击后应加载Div [英] Div should loaded after a click

查看:59
本文介绍了单击后应加载Div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<div id="abc" style="display: block;" >
these div should not be loaded on page load,but should be loaded after a click
</div>
<a href="" onclick="document.getElementById('mydiv2… == 'none'">Load a div</a>




Is there any code to block the browser to not to load a particular div..and after an external click it load that div.

推荐答案

为什么"是否将div的css属性设置为Display:none并使用JQuery使它在按钮的click事件上可见?

很简单,不是吗?
why don''t you set the css property of the div to Display:none and make it visible on click event of the button using JQuery?

It is easy, isn''t it?


这篇关于单击后应加载Div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆