Posted in PHP onJune 13, 2014
<?php echo "<html>"; echo "<head><title>改变背景颜色</title></head>"; if($_POST[inputColor]==""){ $inputColor="ffffff"; } echo "<body bgcolor=#{$_POST[inputColor]}>"; echo "<form action='33.php' method='post'>"; echo "<b>请填写html的颜色</b>"; echo "<input type='text' name='inputColor' value={$_POST[inputColor]}>"; echo "<input type='submit' value='提交背景颜色'>"; echo "</form>"; echo "</body>"; echo "</html>";
PHP根据传来的16进制颜色代码自动改变背景颜色
- Author -
whsnow声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@