我有javascript api发送电子邮件,其中我也可以使用html,所以我在其中创建表但它不工作,表不显示。这是我的代码:
<script>
$(document).ready(function(){
$("#commandEmail1").click(function() {
presenter.command("emailSend",{
"toEmail": "imran.hussain@celeritas-solutions.com",
"toName": "Celeritas",
"subject": "email test",
"body": "Single Attachment",
"bodyHtml":"<table width="200" border="1"><tr><td> </td><td> </td> </tr><tr> <td> </td><td> </td> </tr></table>",
"attachments": [""]
});
return false;
});
})
</script>
答案 0 :(得分:1)
在双引号内使用单引号
"<table width='200'...
或者您可以用"
答案 1 :(得分:0)
代码应该是这样的.. 您使用过双引号..
$(document).ready(function(){
$("#commandEmail1").click(function() {
presenter.command("emailSend",{
"toEmail": "imran.hussain@celeritas-solutions.com",
"toName": "Celeritas",
"subject": "email test",
"body": "Single Attachment",
"bodyHtml":"<table width='200' border='1'><tr><td> </td><td> </td> </tr><tr> <td> </td><td> </td> </tr></table>
",
"attachments": [""]
});
return false;
});
})