可选风格下拉菜单

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"



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值