比如在顶端有一组radio 按钮,横着摆的,下面是一个div 层 层里面有个表单。
刚打开这个页面时候 没有radio 按钮被选中 然后层里面的表单显示灰色 就是不可以点。
再然后选中任何一个radio 就会显示层里面的不同的表单,同时不刷新页面,就是激活那样。如何实现?
刚打开这个页面时候 没有radio 按钮被选中 然后层里面的表单显示灰色 就是不可以点。
再然后选中任何一个radio 就会显示层里面的不同的表单,同时不刷新页面,就是激活那样。如何实现?
解决方案 »
- 请老师指导一下。如何把这个输出变成字符串。
- 静态页
- 【高手进】数组转换问题
- 在php中是否有函数对变量操作后可以得到如下字符
- 如何实现内容与图片分离!!!
- 请教文件及目录的排序
- mysql 不能執行這樣的 sql 語句嗎,請大家幫忙看看!!select customer_id from so where custoemr_id in (select customer_id from so limi
- 我的Mysql数据库可以读出数据,但不可以插入数据,怎么办?
- 请大家帮个忙,给我推荐一本学PHP的书
- 专家称PHP语言漏洞是产生严重网络病毒的温床(都升级到4.1.2没有?Win32的还没有4.1.2版本)
- 求mssql与mysql不能插入三条以上数据的解答
- php 转换 html特殊符号
就是代码无从下手啊 可能要用到js 但我不太懂js 刚开始学…
就是代码无从下手啊 可能要用到js 但我不太懂js 刚开始学…
#lunch_nav, #dinner_nav
{
width:50%;
overflow:hidden;
float:left;
}
</style>
<div>
<div id="lunch_nav"><?php
$query="SELECT * FROM DESTINATION WHERE is_lunch='yes'";
$result=mysql_query($query);
while($get_details=mysql_fetch_array($result))
{
$dest_name=$get_details['dest_name'];
?>
<input type="radio" name="destination_name"/><?php echo $dest_name; ?>
<?php
}
?>
</div>
<div id="dinner_nav">
<?php
$query="SELECT * FROM DESTINATION WHERE is_dinner='yes'";
$result=mysql_query($query);
while($get_details=mysql_fetch_array($result))
{
$dest_name=$get_details['dest_name'];
?>
<input type="radio" name="destination_name"/><?php echo $dest_name; ?>
<?php
}
?>
</div>
</div>
<div id="restuarant_list">
<!-- 这里面就是一些表单 和 一些饭店的名单, 如何能做到没选上radio按钮时候 这区域内容仅仅显示 但是不能点?然后选上一个之后 这里面功能才能正常显示?-->
<?php include("include/shop_list.php");?>
</div>
那如果是表单以外的内容呢?我想把那个include的页面所有的都disable掉 选了radio之后才能正常。
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>check</title>
</head><body>
<script>
function changeForm(param){
document.getElementById("ifr").src = param;
}
</script>
<div>
<label><input type="radio" name="check" onclick="changeForm('form1.html')" />form1</label>
<label><input type="radio" name="check" onclick="changeForm('form2.html')" />form2</label>
<label><input type="radio" name="check" onclick="changeForm('form3.html')" />form3</label><br />
<iframe id="ifr" name="ifr" src="" frameborder="0" scrolling="no" style="border:0"></iframe>
</div>
</body>
</html>form1.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<form name="form1" method="post" action="">
<input type="text" name="input" value="form1" /><br />
<input type="button" name="btn" value="submit" />
</form>
</body>
</html>form2.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<form name="form2" method="post" action="">
<input type="text" name="input" value="form2" /><br />
<input type="checkbox" name="chk" value="2" /> form2<br />
<input type="button" name="btn" value="submit" />
</form>
</body>
</html>form3.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<form name="form3" method="post" action="">
<input type="text" name="input" value="form3" /><br />
<input type="text" name="input1" value="form33" /><br />
<input type="button" name="btn" value="submit" />
</form>
</body>
</html>
对 我就是差不多这个意思,但是我代码里面不能插入iframe
我必须得用<?php include(...)?>把页面加进去 然后根据前面radio的值显示include里面不同内容,该怎么办?
参考;
http://topic.csdn.net/u/20120513/19/6133363b-ea5a-4b36-b719-b0e8483a15e1.html
http://topic.csdn.net/u/20120516/09/dd9c19b5-bbf3-4f1f-bdbb-d58ade236f5f.html