<td width="16%"><a href="show.php">清<input type="hidden" value="1" /></a></td>
<td width="16%"><a href="show.php">普<input type="hidden" value="2" /></a></td>
<td width="16%"><a href="show.php">抗<input type="hidden" value="3" /></a></td>
<td width="16%"><a href="show.php">普<input type="hidden" value="4" /></a></td>
<td width="16%"><a href="show.php">票<input type="hidden" value="5" /></a></td>
<td width="20%"><a href="show.php">香<input type="hidden" value="6" /></a></td>我想点击这些链接时,跳都同一个页面(show.php),但是点不同的链接,在 show.php 获取的内容不一样,
show页面获取的是隐藏域的内容(value的值)
该如何做?请教!
<td width="16%"><a href="show.php">普<input type="hidden" value="2" /></a></td>
<td width="16%"><a href="show.php">抗<input type="hidden" value="3" /></a></td>
<td width="16%"><a href="show.php">普<input type="hidden" value="4" /></a></td>
<td width="16%"><a href="show.php">票<input type="hidden" value="5" /></a></td>
<td width="20%"><a href="show.php">香<input type="hidden" value="6" /></a></td>我想点击这些链接时,跳都同一个页面(show.php),但是点不同的链接,在 show.php 获取的内容不一样,
show页面获取的是隐藏域的内容(value的值)
该如何做?请教!
<td width="16%"><a href="show.php?id=2">普<input type="hidden" value="2" /></a></td>show.php$id =$_GET['id'];
比如我点击了这个链接,
在show页面如何获取value的值呢?
show.php
<?php
print_r($_COOKIE);
?>
<a href="show.php" onClick="foo(this)">清<input type="hidden" value="1" /></a>
<a href="show.php" onClick="foo(this)">普<input type="hidden" value="2" /></a>
<a href="show.php" onClick="foo(this)">抗<input type="hidden" value="3" /></a>
<script>
function foo(tag) {
var value = tag.childNodes[1].value;
document.cookie = 'id=' + value; // + escape(escape(value));
}
</script>