高效Web开发的10个jQuery代码片段
411
2024-02-24
<html>
<body>
<form action ="post.php" method ="post">
Name: <input type="text" name="username" />
<input type ="submit" value="ok" />
</form>
</body>
</html>
<html>
<body>
You are <?php echo $_POST["username"]?>.
</body>
</html>
<html>
<body>
<form action = "radiopost.php" method = "post">
<input type="radio" name="fruit" value = "Apple">Apple</input><br />
<input type="radio" name="fruit" value = "Orange">Orange</input><br />
<input type="radio" name="fruit" value = "Mango">Mango</input><br />
<input type="submit" value="ok">
</form>
</body>
</html>
<html>
<body>
<?php echo $_POST["fruit"]?>
</body>
</html>
<html>
<body>
<form action = "checkboxpost.php" method = "post">
<input type="checkbox" name="fruit[ ]" value = "Apple">Apple</input><br />
<input type="checkbox" name="fruit[ ]" value = "Orange">Orange</input><br />
<input type="checkbox" name="fruit[ ]" value = "Mango">Mango</input><br />
<input type="submit" value="ok">
</form>
</body>
</html>
<html>
<body>
<?php
echo count($_POST["fruit"]),"<br />";
foreach ($_POST["fruit"] as $value)
{echo $value,"<br />";
}
?>
</body>
</html>
#免责声明#
本站[绿夏技术导航]提供的一切软件、教程和内容信息仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络收集整理,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑或手机中彻底删除上述内容。如果您喜欢该程序或内容,请支持正版,购买注册,得到更好的正版服务。我们非常重视版权问题,如有侵权请邮件[admin@lxwl520.com]与我们联系进行删除处理。敬请谅解!