文字改变 [英] Text change

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

问题描述

我有一个问题,我希望有人可以帮助我。


我正在建立一个带有我用数码相机拍摄的照片的网页。我已经成功制作了一个javacript,当点击缩略图时,它会改变主图像。


现在,我想给每张照片写一个解释(以及日期和一些EXIF信息)

所以加载后主照片旁会显示一些文字。

我不喜欢我不知道如何在不重新加载整个页面的情况下更改文本,而且我不想要那个.b $ b不想要那个。


这可以理解吗? />

谢谢,

亨宁

Hi, I have a problem that I hope someone can help me with.

I''m building a web page with pictures I''ve taken with my digital camera. I
have succeded making a javacript that, when clicking on a thumbnail, it
changes the main image.

Now, I would like to put an explanation (and date and some EXIF-info) to
each photo so some text is shown next to the main photo when loaded.
I don''t know how to change the text without reloading the whole page, and I
don''t want that.

Was this understandable?

Thanks,
Henning

推荐答案

>" Henning Vestergaard Poulsen < hv*@livgarden.dk>在消息新闻中写道:BB5F44BD.1089B%hv * @ livgarden.dk ...
>"Henning Vestergaard Poulsen" <hv*@livgarden.dk> wrote in message news:BB5F44BD.1089B%hv*@livgarden.dk...
我有一个问题,我希望有人可以帮助我。
我正在建立一个带有我用数码相机拍摄的照片的网页。我已经成功制作了一个javacript,当点击缩略图时,它会改变主图像。
现在,我想对每张照片进行一次解释(以及日期和一些EXIF信息),这样一些照片会在加载后显示在主照片旁边。
我不喜欢我知道如何在不重新加载整个页面的情况下更改文本,而且我不希望这样。
Hi, I have a problem that I hope someone can help me with. I''m building a web page with pictures I''ve taken with my digital camera. I
have succeded making a javacript that, when clicking on a thumbnail, it
changes the main image. Now, I would like to put an explanation (and date and some EXIF-info) to
each photo so some text is shown next to the main photo when loaded.
I don''t know how to change the text without reloading the whole page, and I
don''t want that.




我最近一直在做很多幻灯片演示,我已经使用表单/输入/文本小部件在一行中显示文件名和其他信息(跨浏览器),并且我使用了一些div和innerHTML来更改多行屏幕描述信息以匹配pic(不确定跨浏览器是怎样的)。您还可以为多行信息设置表单/输入/文本区域。

如果我有很多信息,我可以把它放在滚动的div中。

你也可以填充图像的alt标签,以便通过鼠标弹出信息(我将其设置为文件名或关于单击以保持/继续的信息),不确定这是否是IE唯一的东西。


IE: http://zintel.com/picsel.html


跨浏览器?: http ://zintel.com/cb_start.html


zin



I have been doing alot with slideshows lately, I''ve used a form/input/text widget to display in a single line the file name and other info (cross-browser), and I''ve used some divs and innerHTML to change multiline onscreen descriptive info to match the pic (not sure how cross-browser that is). You could also set a form/input/textarea for multiline info.
If I had a real lot of info I might put it in a scrolling div.
You can also stuff the image''s alt tag so the info pops up via the mouse (I set it to either the filename or info about "click to hold/continue"), not sure if that is an IE only thing.

IE: http://zintel.com/picsel.html

cross-browser?: http://zintel.com/cb_start.html

zin


在HTML中你想要的文字去吧,就这样说吧:


< span id =" the_label">没有选择图片< / span>


然后在javascript中你可以说


document.formname.the_label.innerHTML =" ..文字进入这里......" ;;


我不确定w其他最好使用< span>或者< div>但我认为

在这种情况下也会有相同的效果。


Andy


" Henning Vestergaard Poulsen" ; < hv*@livgarden.dk>在消息中写道

新闻:BB5F44BD.1089B%hv * @ livgarden.dk ...
in the HTML where you want the text to go, just put this:

<span id="the_label">no picture selected</span>

then in javascript you can say

document.formname.the_label.innerHTML = "..text to go in here...";

I''m not sure whether it''s better to use <span> or <div> but I think both
will work the same in this case.

Andy

"Henning Vestergaard Poulsen" <hv*@livgarden.dk> wrote in message
news:BB5F44BD.1089B%hv*@livgarden.dk...
我有一个问题,希望有人可以帮助我。

我正在建立一个带有我用数码相机拍摄的照片的网页。我已经成功制作了一个javacript,当点击缩略图时,它会改变主图像。

现在,我想做一个解释(和日期和一些每张照片的EXIF-info)以便加载时主照片旁会显示一些文字。
我不知道如何在不重新加载整个页面的情况下更改文字,并且
我不想要那个。

这可以理解吗?

谢谢,
Henning
Hi, I have a problem that I hope someone can help me with.

I''m building a web page with pictures I''ve taken with my digital camera. I
have succeded making a javacript that, when clicking on a thumbnail, it
changes the main image.

Now, I would like to put an explanation (and date and some EXIF-info) to
each photo so some text is shown next to the main photo when loaded.
I don''t know how to change the text without reloading the whole page, and I don''t want that.

Was this understandable?

Thanks,
Henning


" Andy Fish" < AJ **** @ blueyonder.co.uk>写道:
"Andy Fish" <aj****@blueyonder.co.uk> writes:
在你希望文本去的HTML中,只需将其放入:

< span id =" the_label"> no picture选中< / span>

然后在javascript中你可以说

document.formname.the_label.innerHTML =" ..文字进入这里..." ;;


我怀疑这会在很多浏览器中运行。符号

" document.formName.x"本身要求浏览器制作文件元素的形式

元素属性,而不是所有的浏览器都这样做。使用document.forms [''formName'']更安全。要素[''x'']" ;.

但是,这只适用于x的情况。是输入元素的名称(或

select,button或textares),它不适用于跨度。


我建议使用

document.getElementById(" the_label")

(可能由IE4的document.all [''the_label'']备份)以访问

要更改内容的元素。然后你可以使用

" .innerHTML = newContent"更改内容或您可以使用DOM

方法(。firstirstChild.nodeValue = newContent)。

我不确定它是否更好使用< span>或者< div>但是我认为在这种情况下两者都会有相同的效果。
in the HTML where you want the text to go, just put this:

<span id="the_label">no picture selected</span>

then in javascript you can say

document.formname.the_label.innerHTML = "..text to go in here...";
I doubt this will work in many browsers. The notation
"document.formName.x" itself requries the browser to make the form
elements properties of the document element, and not all browsers do
so. It is safer to use "document.forms[''formName''].elements[''x'']".
Still, this only works if "x" is the name of an input element (or
select, button or textares), and it will not work for a span.

I recommend using
document.getElementById("the_label")
(possibly backed up by "document.all[''the_label'']" for IE4) to access
the element you want to change the content of. You can then use
".innerHTML=newContent" to change the content or you can use DOM
methods ( ".firstChild.nodeValue=newContent").
I''m not sure whether it''s better to use <span> or <div> but I think both
will work the same in this case.




这取决于你是否需要块元素或内联元素。


/ L''请不要发帖''

-

Lasse Reichstein Nielsen - lr*@hotpop.com

Art D''HTML:< URL:http://www.infimum.dk/HTML/randomArtSplit。 html>

''没有判断的信仰只会降低精神神圣。''



That depends on whether you need a block element or an inline element.

/L ''please don''t top post''
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D''HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
''Faith without judgement merely degrades the spirit divine.''


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

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