您的位置:首页 > 其它

实现背景颜色的改变

2010-06-09 17:00 351 查看



我用的是form表单属性style颜色赋值, 把text文本框颜色值付给style。



代码如下:

<body >
<?php $color=ffffff?>
<?php
if($_POST[sub]){
$color=$_POST[text];
}
?>

<form name="form" method="post" action="" enctype="" style="background:#<?php echo $color;?>">
<table align="center" width="500" height="500" cellpadding="2" cellspacing="0" >
<tr>
<td align="center" width="500" height="450" bgcolor="" >

<input name="text" type="text" size="20" />
<input name="sub" type="submit" value="提取" />

</td>
</tr>
</table>
</form>

</body>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: