我有很多標籤。我想單擊每個標籤,然後將標籤的值發佈/獲取到另一個頁面。如何將值發佈到另一頁並通過iframe取回數據(php)
在另一頁中,收到值並進行mysql查詢。然後將resalt數據返回到第一頁(不要創建iframe)。
我認爲jquery的帖子和加載可能可以做到這一點(但不知道如何結合兩個功能)。或者也許有其他方法。任何人都可以給我一個簡單的例子嗎?謝謝。
更新
products.php
<a href="data.php?get=hml03">model:hml03</a>
<a href="data.php?get=hml04">model:hml04</a>
<a href="data.php?get=hml05">model:hml05</a><!--post value from products.php-->
...<!--many other tags -->
<div class="show_data"></div><!-- get the data back show in here without refresh the page.
data.php
<div id="data">
<?php
$result = mysql_query("SELECT id,name,details,add_date,model FROM ctw_products WHERE (MATCH (name,details,model) AGAINST ('+$_GET['get']' IN BOOLEAN MODE) Order By add_date DESC LIMIT 20 "); // get value with a mysql query
while ($row = mysql_fetch_array($result))
{
echo '<div class="name">'.$row['name'].'</div>';
echo '<div class="model">'.$row['model'].'</div>';
echo '<div class="details">'.$row['details'].'</div>';// how to return this part of datas back to products.php
}
?>
</div>
hot將href值發佈到'ajax - > data'部分?在'yourPage.php'中,我的意思是在'data:「myLogin =調用服務''時寫入'調用服務'',如果我有很多'href'鏈接,謝謝。 – 2011-05-05 09:46:40
'1st link 2nd link 3td link ' 喜歡這個? (當然修改Javascript函數callService()=>添加一個參數=> callService(myParam)) – mnflz 2011-05-05 12:18:57