2

i would like to load (or be visible) an HTML/ASP.NET email form after the user clicked in a link/button. I have used this code but it doesn't work:

<script type="text/javascript">
    $(document).ready(function () {
        $("#imgMail").click(function (htm) {
            $.get("mailform.html"),
                $("#mailForm").append(htm)); //i have tryed also with .html() function.
        });
    });
</script>

where #imgMail is the ID of the link/button and the #mailForm is the ID of the DIV element into load the content.

How can i resolve this problem? P.S. The elements are not into a form tag.

Thanks.

4

1 回答 1

7

用这个..

<script type="text/javascript">
    $(document).ready(function () {
        $("#imgMail").click(function() {
            $.get("mailform.html",function(data){
                $("#mailForm").append(data);
            });
        });
    });
</script>
于 2012-09-25T10:43:20.673 回答