index.html
<select onChange="chengestyle()" id="style">
<option>--请选择--</option>
<option value="one">风格一</option>
<option value="two">风格二</option>
<option value="three">风格三</option>
</select>
<script>
function chengestyle(){
result=document.getElementById("style").value;
document.myform.action="./index.php?style="+result;
document.myform.submit();
}
</script>
<table width="<{$smarty.config.width}>"
height="<{$smarty.config.height}>" border="1" bgcolor="<{$smarty.config.color}>">
<tr>
<td width="130">系统管理</td>
<td width="550">
<table border="0">
<tr>
<td width="150">序号</td>
<td width="150">索引</td>
<td width="150">标题</td>
<td width="300">日期</td>
<td width="150">选择</td>
</tr>
<{section loop=$news name=new start=1 step=2 max=3}>
<tr>
<td><{$smarty.section.new.iteration}></td>
<td><{$smarty.section.new.index}></td>
<td><{$news[new].title}></td>
<td><{$news[new].date}></td>
<td><input type="checkbox" name="checkbox[]"></td>
</tr>
<{/section}>
</table>
</td>
</tr>
<tr>
<form name="myform" method="post">
<td><a href="./index.php?action=addnewsview">添加新闻</a></td>
<td><input type="submit" value="删除"></td>
<input type="hidden" name="action" value=<{$actionvalue}>>
</form>
</table>
index.php
<?php
$style = $_GET['style']; //获取样式名称
$tpl->assign('style',$style);
$tpl->display("index.html");
?>
view.conf
[one]
color="red"
width="800"
height="200"
[two]
width="800"
height="200"
color="green"
[three]
color="yellow"
width="800"
height="200"