本文介绍了使用php更改页面的背景色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个标准的html页面,所以:
I have a standard html page so:
<html> <head>.. . .. and so on并且我有一个链接到该html页面的php脚本,其内容为:
and i have a php script linked to that html page with:
if blablabla { change background color; }如果满足if语句中的条件,是否有人知道如何更改页面的背景颜色?
does anyone know how to change the background color of my page if the conditions in the if statement are met?
我希望我能说清楚,否则请说不清楚.
I hope i made this clear, if not, please say which bit is unclear.
非常感谢您提前提供帮助
Thanks for any help in advance
推荐答案将<body>标记放入if else
put your <body> tag inside the if else
if blablabla { echo '<body style="background-color:white">'; } else { echo '<body style="background-color:orange">'; }更多推荐
使用php更改页面的背景色
发布评论