一个更改HTML显示内容的列表框。 [英] A list box that changes what HTML is displayed.

查看:60
本文介绍了一个更改HTML显示内容的列表框。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我首先应该列出我的背景,那就是我是PHP的新手。

我希望能够有一个HTML表单,其中有一个列表

你可以选择。根据列表中选择的项目

,页面上的其他位置会显示不同的HTML。我知道这可以通过添加提交按钮并重新加载页面来实现


但是有没有办法在没有提交按钮的情况下完成它?


我知道Java可能能够实现这个目标取决于

选择什么它会改变显示但显示的内容

来自PHP ?我知道页面可能需要重新加载新数据。

但是没有提交按钮可以完成吗?也许甚至还有一种方法可以避免重新加载页面来改变HTML?即使我有

重新加载页面也可以在没有提交按钮的情况下完成?


感谢您的帮助。 :)

Chad。

I first should list my background and that is that I''m new to PHP.
I would like to be able to have an HTML form where there is a list
that you choose from. Depending on what item is chosen in the list
different HTML is displayed somewhere else on the page. I know this
might be possible by adding a submit button and reloading the page.
But is there a way to do it without the submit button?

I know that Java might be able to accomplish this where depending on
what is selected it changes what is displayed but what is possible
from PHP? I know the page may need to be reloaded with the new data.
But can that be done without the submit button? Maybe there''s even a
way of avoiding reloading the page to change the HTML? Even if I have
to reload the page can it be done without the submit button?

Thanks for your help. :)
Chad.

推荐答案

< ch ************** ***@yahoo.com写信息

新闻:9a ****************************** **** @ 79g2000h sk.googlegroups.com ...
<ch*****************@yahoo.comwrote in message
news:9a**********************************@79g2000h sk.googlegroups.com...

我首先要列出我的背景,那就是我是PHP的新手。 />
我希望能够有一个HTML表单,其中有一个列表

你可以选择。根据列表中选择的项目

,页面上的其他位置会显示不同的HTML。我知道这可以通过添加提交按钮并重新加载页面来实现


但是有没有办法在没有提交按钮的情况下完成它?


我知道Java可能能够实现这个目标取决于

选择什么它会改变显示但显示的内容

来自PHP ?我知道页面可能需要重新加载新数据。

但是没有提交按钮可以完成吗?也许甚至还有一种方法可以避免重新加载页面来改变HTML?即使我有

重新加载页面也可以在没有提交按钮的情况下完成?


感谢您的帮助。 :)

乍得。
I first should list my background and that is that I''m new to PHP.
I would like to be able to have an HTML form where there is a list
that you choose from. Depending on what item is chosen in the list
different HTML is displayed somewhere else on the page. I know this
might be possible by adding a submit button and reloading the page.
But is there a way to do it without the submit button?

I know that Java might be able to accomplish this where depending on
what is selected it changes what is displayed but what is possible
from PHP? I know the page may need to be reloaded with the new data.
But can that be done without the submit button? Maybe there''s even a
way of avoiding reloading the page to change the HTML? Even if I have
to reload the page can it be done without the submit button?

Thanks for your help. :)
Chad.



你的问题似乎指向AJAX。

你可以结合JavaScript和php来创建动态内容。

Google AJAX。

Vince

Your questions seem to point toward AJAX.
You can combine JavaScript and php to create dynamic content.
Google AJAX.
Vince


6月26日09:52,chadsspameaterem ... @ yahoo.com写道:
On 26 Jun, 09:52, chadsspameaterem...@yahoo.com wrote:

我首先要列出我的背景,那就是我是PHP的新手。

我希望能有一个HTML表单有一个列表

你可以选择。 *取决于列表中选择的项目

不同的HTML显示在页面的其他位置。 *我知道这可以通过添加提交按钮并重新加载页面来实现


但是有没有办法在没有提交按钮的情况下完成它?


我知道Java可能能够实现这个目标取决于

选择什么它会改变显示但显示的内容

来自PHP? *我知道页面可能需要重新加载新数据。

但是可以在没有提交按钮的情况下完成吗? *也许甚至还有一种方法可以避免重新加载页面来改变HTML? *即使我有

重新加载页面也可以在没有提交按钮的情况下完成?


感谢您的帮助。 :)

乍得。
I first should list my background and that is that I''m new to PHP.
I would like to be able to have an HTML form where there is a list
that you choose from. *Depending on what item is chosen in the list
different HTML is displayed somewhere else on the page. *I know this
might be possible by adding a submit button and reloading the page.
But is there a way to do it without the submit button?

I know that Java might be able to accomplish this where depending on
what is selected it changes what is displayed but what is possible
from PHP? *I know the page may need to be reloaded with the new data.
But can that be done without the submit button? *Maybe there''s even a
way of avoiding reloading the page to change the HTML? *Even if I have
to reload the page can it be done without the submit button?

Thanks for your help. :)
Chad.



而不是Java,我认为你的意思是javascript。你要问的所有问题都是客户方问题。在javascript newsghroup中肯定会问这个地方是



但是,因为已经有很多关于

的信息怎么样这样做,我建议你先在Google上搜索。

Rather than Java, I think you mean javascript. All the questions that
you are asking are client side ones. The place to ask this is
certainly in a javascript newsghroup.
However, since there is already so much information out there about
how to do this, I would urge you to search on Google first.


ch ***************** @ yahoo.com 写道:

我首先应该列出我的背景,那就是我是PHP的新手。

我希望能够有一个HTML表单,其中有一个列表

你可以选择。根据列表中选择的项目

,页面上的其他位置会显示不同的HTML。我知道这可以通过添加提交按钮并重新加载页面来实现


但是有没有办法在没有提交按钮的情况下完成它?
I first should list my background and that is that I''m new to PHP.
I would like to be able to have an HTML form where there is a list
that you choose from. Depending on what item is chosen in the list
different HTML is displayed somewhere else on the page. I know this
might be possible by adding a submit button and reloading the page.
But is there a way to do it without the submit button?



只有一些javascript,也可能像Ajax一样。


即你不能改变没有客户端的页面上的内容

智能,或重新加载部分或全部信息,或两者兼而有。

Only with some javascript, and possibly something like Ajax as well.

I.e. you cannot alter what is on a page without client side
intelligence, or reloading some or all o the info, or both.


我知道Java可能能够实现这个目标取决于

选择什么它会改变显示的内容但是什么是可能的?来自PHP的
?我知道页面可能需要重新加载新数据。

但是没有提交按钮可以完成吗?
I know that Java might be able to accomplish this where depending on
what is selected it changes what is displayed but what is possible
from PHP? I know the page may need to be reloaded with the new data.
But can that be done without the submit button?



是的,但只能使用javascript来调用''submit()''类型函数。

Yes, but only by using javascript to invoke a ''submit()'' type function.


也许甚至还有一种方法可以避免重新加载页面来改变HTML?即使我有

来重新加载页面也可以在没有提交按钮的情况下完成?
Maybe there''s even a
way of avoiding reloading the page to change the HTML? Even if I have
to reload the page can it be done without the submit button?



提交按钮实际上是他为了免除你的后顾之忧。正如我所说的那样最简单的javascript可以得到riond那个。


很多信息都是关于修改页面reprsent的信息:如果它是

不是太多而且它的所有文本,仅使用javascript重新使用

stuff''隐形''分层ver并且在可见的东西下并不太难。


但是如果可能性非常大,那么你想动态地重新加载

部分或全部页面:我相信ajax是要走的路

在这里,但不知道它究竟是如何工作的。


或者只是重新加载整个页面。

The submit button is really he lest of your worries. As I said
javascript of teh most minimal can get riond that.

A lot depeds on how much informatin teh modified pages reprsent: if its
not too much and its all text, redarwing with javascript alone using
stuff ''made invisible'' layerd ver and under visible stuff is not too hard.

If however the possibilities are pretty large, then you want to reload
some or all of the page dynamically: I believe ajax is the way to go
here,but have no idea exactly how it works.

Or just reload the WHOLE page.


感谢您的支持救命。 :)

乍得。
Thanks for your help. :)
Chad.


这篇关于一个更改HTML显示内容的列表框。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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