else { echo"
<td style='color:green' onclick=alert '('You have already send a request for buying this ticket ')'><a href='sell.php?buy=" . $b_id . "&usr=" . $buyer_id . "&sell=" . $s_id . "'> Resend Your detail </a>
</td>"; echo"
</tr>";
请帮助将javascript与内联样式表绑定。任何帮助,将不胜感激。
答案 0 :(得分:1)
onclick=\"javascript:alert('You have already send a request for buying this ticket')\"
检查
<div onclick="javascript:alert('You have already send a request for buying this ticket')">CLICK HERE </div>
<a style='color:green' href='sell.php?buy=" . $b_id . "&usr=" . $buyer_id . "&sell=" . $s_id . "'> Resend Your detail </a>
答案 1 :(得分:1)
在你的任务中
<td style='color:green' onclick=\"javascript:alert('You have already send a request for buying this ticket')\"><a href='sell.php?buy=" . $b_id . "&usr=" . $buyer_id . "&sell=" . $s_id . "'> Resend Your detail </a>
你的引用风格不是最佳的
答案 2 :(得分:1)
else { echo"
<td onclick=\ "javascript:alert('You details is resend ')\"><a style=\ "color:green\" href='sell.php?buy=" . $b_id . "&usr=" . $buyer_id . "&sell=" . $s_id . "'> Resend Your detail </a>"; echo"
</tr>"; }
这是正确的答案问题已解决
答案 3 :(得分:0)
onclick=\"javascript:alert('You have already send a request for buying this ticket')\"