0

HTMLファイルの画像クリックからメールを送信しようとしていますが、ファイル内では機能しません。単一の画像を含む別のファイルで行っているのと同じで、機能しています。これは、htmlでコードを呼び出している場所です

    <div class="root_panel_img"><img src="images/main_button.png" id="commandEmail1" /></div>

http://codepad.org/jFrQTVrM

ここにJavaScriptファイルがあります

http://codepad.org/aagrAjNs

4

2 に答える 2

1
 $(document).ready(function(){
      $("#commandEmail1").click(function() {
            ......
            ......

            "You can test this if it is working or not by putting an alert("OK") message."
      });
 });
于 2013-01-26T06:52:59.710 に答える
0

提供されたコードによると、以下は機能していませんか?

$("#commandEmail2").click(function() {
    presenter.command("emailSend",{
        "toEmail": "debug@orchard.net.au",
        "toName": "Debug",
        "subject": "Presenter Library Test",
        "body": "Dual Attachment",
        "bodyHtml": "<h1>Dual Attachment</h1>",
        "attachments": ["/pdf/ip6.pdf","/pdf/docs.pdf"]
    }, status);
    return false;
});

これは機能しますか?

$("#commandEmail2").click(function() {
    alert("this works");
    return false;
});

もしそうなら、presenter.commandの何かが失敗し、それはあなたが投稿していないコードです。

于 2013-01-26T07:11:27.600 に答える