var EventAddress=$(".EventAddress").text();
$(".EventDirectionLink a").attr("href", url + EventAddress);
這是我用來從表格單元格中獲取地址值並將它作爲查詢字符串傳遞給地圖url的jquery,但它不工作?我究竟做錯了什麼??將查詢字符串添加到URL
<div class="driving-directions-link">
<a href="http://maps.google.com/maps?q=">Get Direction</a>
</div>
<table cellpadding="10" class ="EventDetail">
<tr>
<td class="TableFields">Who Should Enroll?:</td>
<td>Everyone 18 and older who would like to attend</td>
</tr>
<tr>
<td class="TableFields">Location:</td>
<td class="EventAddress">1300 Albany Street,Beech Grove ,IN</td>
</tr>
</table>