0

with jquery how would you set up div so that when you click on it, it takes the content of a child div, opens up a new e-mail and makes that contents the title of the e-mail.

Below is the div structure, and below that is the javascript I started, but I just have no idea how to do the email part.

<div class="additional_item_container">
    <div class="additional_item_name">Carlo De March, Venezia, c. 1953</div>
</div>


$(".instrument_container").click(function () {
    var email_title = $(this).find(".additional_item_name");

)};
4

1 回答 1

2

像这样的东西会起作用......

$(".additional_item_container").click(function () {
    var email_title = $(this).find(".additional_item_name").html();
    window.location.href = "mailto:address@gmail.com?subject=" + email_title;
});
于 2013-01-17T21:17:36.227 回答