你好,我是jquery的新手。在Jquery中使用圖像無法正常工作 - 轉義引號
我在WordPress的
一個投票系統,這是代碼
工作正常位時
$.post('<?php echo admin_url('admin-ajax.php'); ?>', data,
function(response){
if(response!="-1") {
el.html("VOTED").unbind("click");
if(response=="null") {
alert("A vote has already been registered to this IP address.");
} else {
$("#votecounter").html(response);
alert("Thanks for your vote.");
}
當
el.html("VOTED")
使用文本,但在我使用 這個我使用這個不起作用
el.html("<img width="584" height="455" src="/wp-content/uploads/2012/12/Hydrangeas.jpg" class="attachment-large wp-post-image" alt="Hydrangeas">")
我不會就如何繞過投票系統的用戶信息。不要說「這個IP已經投票」,只需寫下「你已經投了票」。 – eandersson
多色字符串突出顯示錶示某件事不正確。在SO中發佈問題之前,請檢查JSLint的語法,控制檯錯誤,文檔等。 – elclanrs