自修改HTML代码? [英] Self-modifying HTML code?
问题描述
HTML网页是否可以动态修改自己的代码?
(不依赖于Java或任何其他非HTML复杂性)
也就是说,HTML中是否存在任何单个
Next的条款。主页面或index.html页面上的按钮将:
a)更改该页面上显示的图像(比如Picture_1.jpg)
到下一个图像一个序列(比如Picture_2.jpg),和
b)重新编程下一个按钮,这样当它再次点击
时它将用Picture_3.jpg替换Picture_2.jpg,依此类推
通过一系列图像。
结果可能是单页幻灯片放映
* index.html和Picture_1,Picture_2等,是网站上唯一的
文件;没有其他中间链接 HTML页面。
* Picture_1,Picture_2等,是纯JPEG文件 - 没有隐藏的HTML。
*任何单独的图片可立即更换较新的版本,
没有重新编码
*相同的索引页面将使用不同的图片序列
提供每个索引页面和序列在不同的文件夹中
*否画廊需要单个幻灯片的缩略图
这在纯HTML中是不可能的。 。对吧?
Can an HTML web page dynamically modify its own code?
(without resort to Java or any other non-HTML complexities)
That is, is there any provision in HTML such that a single
"Next" button on a main or index.html page will:
a) Change an image displayed on that page (say Picture_1.jpg)
to the next image in a sequence (say Picture_2.jpg), AND
b) "Reprogram" the Next button so that when its clicked again
it will replace Picture_2.jpg with Picture_3.jpg, and so on
thru a sequence of images.
Result could be a "one page slide show" with
* index.html and Picture_1, Picture_2, etc, being the ONLY files on
the web site; no other intermediate "linking" HTML pages.
* Picture_1, Picture_2, etc, being pure JPEG files -- no hidden HTML.
* Any individual picture immediately replaceable with newer version,
with no recoding
* Identical index pages will work with different picture sequences
provided each index page and sequence are in different folders
* No "gallery" with thumbnails of individual slides needed
This is not possible in pure HTML . . right?
推荐答案
AES写道:
AES wrote:
HTML网页是否可以动态修改其网页自己的代码?
(不使用Java或任何其他非HTML复杂性)
Can an HTML web page dynamically modify its own code?
(without resort to Java or any other non-HTML complexities)
No.
-
jmm(连字符)列表(at)sohnen-moe(点)com
(删除电子邮件的.AXSPAMGN)
No.
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
AES写道:
AES wrote:
HTML网页可以动态修改自己的代码吗?
>
(不使用Java或任何其他非HTML复杂性)
Can an HTML web page dynamically modify its own code?
(without resort to Java or any other non-HTML complexities)
HTML无法动态执行任何操作。 HTML仅描述内容。它
不包含任何说明。
HTML doesn''t do anything dynamically. HTML only describes content. It
contains no instructions.
AES< si ***** @ stanford.eduwrites:
AES <si*****@stanford.eduwrites:
HTML网页可以动态修改自己的代码吗?
Can an HTML web page dynamically modify its own code?
No.
No.
这在纯HTML中是不可能的。 。对?
This is not possible in pure HTML . . right?
不,但添加一些CSS,它或多或少的工作。有点。好的
天。
http://www.dur.ac.uk/cimorris/htmlslides.html
在基于Gecko的浏览器中工作,在IE中不起作用或歌剧。我还没有测试过其他任何东西。由于它需要使用表单控件的样式,并且使用< buttonelement,因此它可能并不令人惊讶,因为它不可靠(并且具有严重的可访问性问题)什么时候
工作)。
你最好选择一个服务器端图像库(和
$ b) $ b它可能是不值得的)支持Javascript让你
避免整页重新加载。
-
Chris
No, but add a bit of CSS and it more-or-less works. Sort of. On a good
day.
http://www.dur.ac.uk/c.i.morris/htmlslides.html
Works in Gecko-based browsers, doesn''t work in IE or Opera. I haven''t
tested anything else. Since it requires styling of form controls and
uses the <buttonelement, it''s perhaps not surprising it''s incredibly
unreliable (and with serious accessibility problems even when it does
work).
You''d be better off with a server-side image gallery, optionally (and
it probably isn''t worth it) with support for Javascript to let you
avoid full-page reloads.
--
Chris
这篇关于自修改HTML代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!