I am fetching tweets and showing them into the slider . now when i open the page it shows me all the tweets one above another which create a mess. and after page fully loaded it shows me tweets as i wanted . so is there any way to show tweets or run php code when page is fully loaded ?
关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率

已采纳
如何在页面完全加载时运行php脚本
收起
- 写回答
- 好问题 0 提建议
- 关注问题
微信扫一扫
点击复制链接分享
- 邀请回答
- 编辑 收藏 删除 结题
- 收藏 举报
2条回答 默认 最新
- 关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
douwei1921 2014-09-10 05:56关注It sounds like all your tweets are output via php, and then styled into a slider with javascript, so in between the data being output and the javascript loading, you see the unstyled data.
A simple solution would be to give the containing element a style of display:none, then show it via javascript when the page has loaded:
css
#tweet-holder{ display:none; }
php / html
<div id="tweet-holder"> //all your tweets go here </div>
js
$(function(){ $('#tweet-holder').show(); });
本回答被题主选为最佳回答 , 对您是否有帮助呢? 本回答被专家选为最佳回答 , 对您是否有帮助呢? 本回答被题主和专家选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏举报微信扫一扫
点击复制链接分享
编辑预览轻敲空格完成输入- 显示为
- 卡片
- 标题
- 链接
评论按下Enter换行,Ctrl+Enter发表内容
编辑
预览

轻敲空格完成输入
- 显示为
- 卡片
- 标题
- 链接
报告相同问题?
提交
- 2016-12-31 04:08回答 1 已采纳 The most simple method to achieve this would be to use some JavaScript to attach an event listener
- 2017-02-09 03:34回答 1 已采纳 You can use "&" et the end : exec("python ..\alarm.py $year $month $day $hour $minute &");
- 回答 2 已采纳 You could try the set_time_limit() function: http://php.net/manual/en/function.set-time-limit.php
- 2020-10-23 17:27当页面执行完毕,即将关闭时,我们在页面底部再次获取时间戳,并与开始时间进行比较,计算出两者的差值,即为页面加载所需的时间: ```php $diff = time() - $start; print "This page needed $diff seconds to ...
- 2018-10-19 14:26回答 3 已采纳 You should rather let the page load and e.g. run an AJAX request that will wait for a reply/listen
- 2018-07-31 00:01回答 1 已采纳 Change your function to this you have some errors function handleLogin($arrData, Client $objClien
- 2019-02-28 18:18回答 3 已采纳 Because Apache (or the web server you're using) executes PHP using different Linux user (usually w
- 2025-02-14 19:34JavaScript文件在前端开发中扮演着重要角色,这些文件通常负责实现页面的动态交互效果,如表单验证、数据异步加载、用户界面的动态更新等。而HTML文件则构建了应用的骨架,是用户直接面对的页面结构。CSS文件用于...
- 2014-08-26 03:45回答 10 已采纳 Have you verified that AcumulusExportBase is included before AcumulusExportWorkshop under Linux? P
- 2019-03-12 07:01回答 1 已采纳 if(location.href === 'https://example.com/donotrunhere') throw new Error('This is not an error
- 2019-07-30 12:14回答 1 已采纳 Don't send multiple Content-type headers, send the appropriate type for the file extension. if (i
- 2025-02-16 17:08在前端设计中,图片的优化和适配对于提升页面加载速度和保持视觉吸引力至关重要。 HTML文件共有67个,这些文件构成了网站的基础结构。HTML元素定义了网页内容的骨架,比如段落、标题、列表和表单等。它们为后续的...
- 2021-04-28 20:51fafa阿花的博客 ( 网页加载时,有时内容过多,一直加载等待,而此时网页显示白色不显示任何的东西,给用户的体验相当不好,所以,一般会在网页加载成功前,会以进度条的形式,给用户进行展示。让用户可以看到动画,知道网页正在加载...
- 2024-11-24 01:09同时,后台PHP脚本可以设置定时器,当页面加载完成时,会自动跳转到相应的外站页面,或提示用户页面已经加载完成,用户可以进行下一步操作。 这套源码不仅仅适用于游戏类网站,对于任何需要等待加载的网页都有很好...
- 2020-10-23 23:40在本文提供的示例中,data.php脚本负责接收从前端发送过来的参数,执行数据库查询,并返回JSON编码的数据列表。 使用jquery.more.js插件实现点击加载更多内容的好处包括: 1. 提升用户体验:无需刷新页面即可获取更...
- 没有解决我的问题, 去提问
联系我们(工作时间:8:30-22:00)
400-660-0108kefu@csdn.net在线客服
- 京ICP备19004658号
- 经营性网站备案信息
公安备案号11010502030143
- 营业执照
- 北京互联网违法和不良信息举报中心
- 家长监护
- 中国互联网举报中心
- 网络110报警服务
- Chrome商店下载
- 账号管理规范
- 版权与免责声明
- 版权申诉
- 出版物许可证
- ©1999-2025北京创新乐知网络技术有限公司