这是“标签”模块的脚本我想更改为选择带有选项的框
我尝试更改代码,但我不能使用原始代码:
有人可以帮助我吗?
<script type="text/javascript">
window.addEvent('load',function(){
var spTab<?php echo $uniqid ?> = new sptabs($('sptab<?php echo $uniqid ?>'), {
animation : <?php echo "'" . $animation . "'" ?>,
btnPos: <?php echo "'" . $btnPos . "'" ?>,
activator: <?php echo "'" . $activator . "'" ?>,
transition: <?php echo 'Fx.Transitions.' . $transition ?>,
fxduration: <?php echo $fxspeed ?>,
autoHeight : <?php echo $body_height ?>,
fixedHeight: <?php echo $fixed_height ?>
});
});
</script>
<div class="<?php echo $color ?>" id="sptab<?php echo $uniqid ?>">
<?php foreach ($list as $item) : ?>
<div style="display:none">
<div class="tab-padding">
<h2 style="display:none" class="title"><span id="<?php echo (preg_replace('/\s+/', '_',strtolower($item['title']))); ?>" class="sptab-title<?php echo ($item['sfx']) ? ' sptab_sfx' . $item['sfx'] : ''; ?>"><?php echo $item['title']; ?></span></h2>
<?php echo $item['content']; ?>
<div style="clear:both"></div>
</div>
</div>
<?php endforeach; ?>
</div>
答案 0 :(得分:0)
我认为你正在寻找这样的东西:
<select>
<?php foreach ($list as $item) : ?>
<option><?php echo $item['title']; ?></option>
<?php endforeach; ?>
</select>
请注意,不会需要您在问题中提供的javascript