php下拉框点击跳转不了?请高手帮忙一下
来源:百度知道 编辑:UC知道 时间:2024/06/24 17:32:43
<form action='ss1.php' method="GET">
<select name='select'>
<option value="title">标题</option>
<option value="content">内容</option>
</select>
<input type= "submit" value="提交">
</form>
ss1.php
<?php
$title=$_GET[title];
echo"<META HTTP-EQUIV=\"Refresh\" Content=\" 1;URL=http://localhost/delete.php\">";
?>
<?php
$content=$_GET[content];
echo"<META HTTP-EQUIV=\"Refresh\" Content=\" 1;URL=http://localhost/ff.php\">";
?>
<select name='select'>
<option value="title">标题</option>
<option value="content">内容</option>
</select>
<input type= "submit" value="提交">
</form>
ss1.php
<?php
$title=$_GET[title];
echo"<META HTTP-EQUIV=\"Refresh\" Content=\" 1;URL=http://localhost/delete.php\">";
?>
<?php
$content=$_GET[content];
echo"<META HTTP-EQUIV=\"Refresh\" Content=\" 1;URL=http://localhost/ff.php\">";
?>
支持IE、FF、chrome的标准语法用document.getElementById()
如下:
<form action="ss1.php" method="GET" id="form_jump">
<select name="select" onChange="javascript:document.getElementById('form_jump').submit();">
<option value="delete">标题</option>
<option value="ff">内容</option>
</select>
<input type= "submit" value="提交">
</form>
ss1.php
<?php
echo '<META HTTP-EQUIV="Refresh" Content=" 0;URL=/' . $_GET['select'] . '.php">';
exit();
?>
<select name='select' onchange="form.submit();">
<select name='select' onchange="javascript:location.href=xx">
<select name='select' onchange="top.location.href='ss1.php?