我必須發送郵件的HTML與jQuery的工具提示。該html工作正常,但jQuery的工具提示不顯示與HTML。我的代碼是如何發送jQuery郵件功能使用PHP?
require_once("config.php");
$to= "[email protected]";
$subject= "Todays follow up status from Murree Hotels Website";
$query= "select * from honymoon_enquries WHERE arrival_date BETWEEN DATE(NOW()) AND DATE(NOW())+7 order by arrival_date";
$res=mysql_query($query);
$message = "<strong>Hi Admin <br><br> </strong>";
$message .= "<strong> Here is the list of all clients coming in next seven(7) days.<br><br> </strong>";
$message .="
<link rel='stylesheet' href='jquery-tooltip/jquery.tooltip.css'/>
<script src='jquery-tooltip/lib/jquery.js' type='text/javascript'></script>
<script src='jquery-tooltip/lib/jquery.bgiframe.js' type='text/javascript'></script>
<script src='jquery-tooltip/lib/jquery.dimensions.js' type='text/javascript'></script>
<script src='jquery-tooltip/jquery.tooltip.js' type='text/javascript'></script>
<script src='jquery-tooltip/demo/chili-1.7.pack.js' type='text/javascript'></script>
<script type='text/javascript'>
$(function() {
$('#right *').tooltip({
track: true,
delay: 100,
showURL: false,
extraClass: 'right'
});
$('#right2 a').tooltip({ showURL: false, positionLeft: true });
$('#block').click($.tooltip.block);
});
</script>
<table width='100%' cellpadding='0' cellspacing='0' style='margin-top:5px;margin-bottom:5px;'>
<tr>
<td>
<div style='border:1px solid #CCCCCC; padding:10px; padding-top:5px; text-align:center'>
<div>
<table width='100%' border='1' cellpadding='5' cellspacing='3'>
<tr>
<th>Name</th>
<th>Email</th>
<th>Phone</th>
<th>Arival_Date</th>
<th>Adminfeedback</th>
</tr>
";
while ($resresult = mysql_fetch_array($res)) {
$message .="
<tr BGCOLOR='99CCFF'>
<td>".$resresult['client_name']."</td>
<td>".$resresult['client_email']."</td>
<td>".$resresult['client_phone']."</td>
<td>".$resresult['arrival_date']."</td>
<td align='left' title='".$resresult['adminfeedback']."' style='cursor:help;'>".$resresult['adminfeedback']."</td>
";
}
$message .="</table></div></td> </tr> </table></div>" ;
$headers = "From: [email protected]"."\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
if (!mail($to,$subject,$message,$headers)) {
die("Message sending failed");
}
你想要一個JavaScript工具提示在電子郵件?簡短的回答 - 你不能。如果電子郵件客戶端允許js,那麼這是一個很大的安全問題,所以他們不會。 – 2011-06-10 04:55:49
不行。在電子郵件中的JavaScript是不行的。 – jpea 2011-06-10 04:57:44
他可以,電子郵件可以包含HTML和JavaScript – Dani 2011-06-10 04:58:13