-1
我正在使用cakephp 2.9。我想動態給ID。 ID應該根據字母改變。ID Shold動態變化
$alphas = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
<script>
$(document).ready(function() {
$('#lettera').click(function() {
var a = $('#lettera').text();/* alert(a); */
});
});
</script>
<section>
<div class="container">
<div class="row">
<ul class="list-inline">
<li>
<?php
foreach($alphas as $letter){
echo ($this->Html->tag('a', $letter, ['id' => 'letter'.$letter]));
}
echo $this->Html->para('bid_val', '');
?>
<li>
</ul>
</div>
</div>
</section>
其工作....謝謝! – Ajay