刷新div元素 [英] Refresh div element

查看:117
本文介绍了刷新div元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




i有div元素,我从数据库驱动数据并随机显示。


所以当我点击一个按钮调用一个javascript函数,通过该函数可以在不使用ajax的情况下刷新此div

元素,以便数据以不同的顺序显示..


/>
谢谢

vijay

解决方案

@vjayis


取决于您是否可以单独访问数据。比方说,如果它是一个文本节点,几乎没有重新排列数据的选项,但如果你有段落中的每个数据,JS可以重新排列它们。


问候

抱歉,我无法得到你...


i显示了一些使用php在div元素中从数据库驱动的数据。


所以如果我刷新div然后数据以不同的顺序显示,因为我使用rand函数显示。


所以如果需要刷新div元素。,


这可以使用iframe完成。但我需要使用div来完成..


@vjayis


如果您可以发布< div>的示例(PHP完成后的HTML)我可以告诉你我的意思。


hi

i have div element in which i have driven datas from database and displayed in random.,

so when i click an button an javascript function is called through which this div
element should get refreshed without using ajax so that the datas are displayed in different order..



thanks
vijay

解决方案

@vjayis
that depends upon whether you can access the data separately. say, if it is one text node, there is hardly an option to rearrange the data, but if you have each data in a paragraph, JS can rearrange them.

regards


sorry i cant get u..

i hav displayed some datas driven from database using php inside a div element.,

so if i refresh the div then the datas are displayed in diferent order since i hav displayed using rand function .

so if need to refresh that div element.,

this can be done using iframe., but i need it to be done using div..


@vjayis
if you can post an example of your <div> (the HTML after PHP has finished) I can tell you what I mean.


这篇关于刷新div元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆