使用php更改页面的背景色

编程入门 行业动态 更新时间:2024-10-27 18:25:23
本文介绍了使用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更改页面的背景色

本文发布于:2023-11-05 04:26:42,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1559897.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:背景色   页面   php

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!