这么做到选择国家的时候省市和市区显示 选择市区的时候出现省市和国家的选择 。
<form action="city.php?module=add" method="post" name='frmdirection' id='frmdirection'> <input type="hidden" name="id" value="{$data.id}" id="uid"/> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="ttbb2"> <tr> <td width="40%" align="right" bgcolor="#e9f4ff"><strong>地区/行政区域</strong></td> <td> <input type="radio" name="pos_occu" value="2" {if $data.parentid eq "" or $data.parentid neq "99999"}checked="checked"{/if} onclick="clickradio()"/>地区 <input type="radio" name="pos_occu" value="0" {if $data.parentid eq "" or $data.parentid neq '99999'}checked="checked"{/if} onclick="clickradio()"/>省份 <input type="radio" name="pos_occu" value="1" {if $data.parentid eq '99999'}checked="checked"{/if} onclick="clickradio()"/>国家 </td> </tr> <tr> <td width="40%" align="right" bgcolor="#e9f4ff"><strong>名称</strong></td> <td><input type ="text" class="txt150" name = "data[name]" value="{$data.name}" id="name"> </td> </tr> <tr > <td width="40%" align="right" bgcolor="#e9f4ff"><strong>所属国家</strong></td> <td> <select name = "data[parentid]" id="parentid" {if $data.parentid neq '99999'}style="display:block"{else}style="display:none"{/if}> {foreach from=$parent item=item key=index} <option value="{$item.id}" {if $item.id eq $data.parentid && $data.parentid neq ""} selected="selected" {/if} >{$item.name} </option> {/foreach} </select> </td> </tr> <tr > <td width="40%" align="right" bgcolor="#e9f4ff"><strong>所属省份</strong></td> <td> <select name = "data[parentid]" id="parentid" {if $data.parentid neq "99999"}style="display:block"{else}style="display:none"{/if}> {foreach from=$parent item=item key=index} <option value="{$item.id}" {if $item.id eq $data.parentid && $data.parentid neq ""} selected="selected" {/if} >{$item.name} </option> {/foreach} </select> </td> </tr> </table></form>
Difeye是一款超轻量级PHP框架,主要特点有: Difeye是一款超轻量级PHP框架,主要特点有: ◆数据库连接做自动主从读写分离配置,适合单机和分布式站点部署; ◆支持Smarty模板机制,可灵活配置第三方缓存组件; ◆完全分离页面和动作,仿C#页面加载自动执行Page_Load入口函数; ◆支持mysql,mongodb等第三方数据库模块,支持读写分离,分布式部署; ◆增加后台管理开发示例
0
没明白 你想干什么
是数据库设计不好
还是代码不会写
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号