我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

php是否能够回显将html / css div元素作为类标记提供的纯文本?

<div id="myProfile" <?php if($_GET['page'] == 'myProfile'){echo 'class="show"';}else{echo 'class="hide"';} ?>>
    div content which should be shown/hidden...
</div>

My div doesn't hide when I click a link which adds 'page=myProfile' to the URL. This if() php statement is supposed to echo my css class 'show' and 'hide' when the site is & is not 'myProfile'. Does anyone see an error? I'm giving up now for real…

近期文章

  • 收到数据后,ajax调用错误地重定向浏览器但使用curl显示服务器的响应中没有重定向
  • 使用Yii 2中的Html ::按钮
  • 下载application / octet-stream
  • 链接ajax加载php和刷新div
  • Codeigniter表单序列化不起作用
  • 通过POST方法在Ajax-Requests中使用&字符
  • PHP应用程序在云服务器中无响应
  • 无法从url访问通过gii创建的CRUD
  • 无法在PHP中将MySQL数据下载到Excel
  • 如何减少mysql查询的内存和CPU使用?
  • 使用未定义的警报在codeigniter中上传图像文件
  • 使用AJAX中的.done()生成对页面的数据响应
  • Google Developer Console OAuth Client Secret不包含“秘密”?
  • 自动启动MongoDB服务器
  • 如何命名模型的“预构建”对象的父类?
  • 我们怎样才能在cakephp中包含default.ctp?
  • Fullcalendar-不要在星期日显示任何事件
  • XML动态变化
  • 离子HTTP请求延迟更新
  • Laravel控制器返回路线

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华