开发者

display image in mvc2 after button click

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/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜