我想从链接获取id值,因为它没有改变:
<?php $se = mysql_query("select * from tee") or die(mysql_error());
while($row = mysql_fetch_object($se)){
echo'<a class="link" href="?id=" class="big-link" data-reveal-id="m'.$row->id.'">
'.$row->id.'
</a>'; }
?>
<?php
$se1 = mysql_query("select * from tee") or die(mysql_error());
while($row1 = mysql_fetch_object($se1)) {
echo '<div id="m'.$row1->id.'" class="reveal-modal">
<h1>Reveal Modal Goodness</h1>
<p>This is a default modal in all its glory, but any of the styles here can easily be changed in the CSS.</p>
<a class="close-reveal-modal">×</a>
</div>
';}?>
第一个div显示数字,第二个div显示灯箱内容
我想从链接获取id值,因为它不会改变
答案 0 :(得分:0)
如果要获取html数据属性值,可以使用以下命令:
$("a.big-link").data("reveal-id")