i need to display an image开发者_JS百科 only after a button click in asp.net mvc2 but i am getting it even before click as well as after click can someone give me a solution as to why this is happenning??
Try something on the lines of:
<html>
<head>
<script src="http://code.jquery.com/jquery-1.5.js"></script>
</head>
<body>
<button>Show it</button>
<img src="url" style="display: none" />
<script>
$("button").click(function () {
$("img").show("slow");
});
</script>
</body>
</html>
http://api.jquery.com/show/
精彩评论