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

问题描述



伙计,


假设我有一张桌子,十列,十行 - 每个都有一个单词。我希望

通过超链接更改表格中部分/全部单元格的值。

如何引用每个单元格并从链接更改其文本内容

页面的其他地方?我有一个想法,我需要在我的< td>中找到类似

''id''的东西。虽然我对服务器端有更深入的理解,但是对PHP这样的编程语言来说,javascript对我来说仍然是一个新手。


有人可以帮忙吗?我正在学习越来越多关于文档属性的内容所以

如果有人可以给我一个快速的例子(带一些评论

语句)它应该给我足够的玩法和教育自己(因为

反对提供完整的答案而我学得很少)。


所有帮助,通过新闻组,非常感谢,谢谢,

randelld


Folks,

Say I have a table, ten columns, ten rows - Each with a word in it. I want
to change the values of some/all of the cells in the table via a hyperlink.
How do I reference each cell and change its text contents from a link
elsewhere in the page? I have a rought idea that I''ll need something like
''id'' in my <td> tags but while I have a greater understanding of server-side
programming langauges like PHP, javascript is still very new to me.

Can someone help? I am learning more and more about document properties so
if someone could provide me with a quick example (with some remark
statements) it should give me enough to play with and educate myself (as
opposed to providing the full answer and I learn little).

All help, via the newsgroup, is much appreciated, thanks,
randelld

推荐答案





如果我的原始问题可能不够清楚,我很害怕 -

因此...如果有人可以提供一个简单的文本示例table

cell ...以及单击时单独链接,将更改表格单元格中保存的文本(而不是

图像)...


再次,所有帮助,通过新闻组得到了很多鼓励

randelld



I''m afraid in case my original question might not have been clear enough -
thus... if someone could supply me with a simple example of text in a table
cell... and a seperate link that when clicked, will change the text (not the
image) held in the table cell...

again, all help, via newsgroup is much apprecaited
randelld





< table>< tr>< td id =" cell43">

原文

< / td>< / tr>< / table>


<按钮

onclick = " document.getElementById(''cell43'')。innerHT ML =

''新单词''">

更改单元格43< / button>

-

Evertjan。

荷兰。

(请将x''改为我的点数emailaddress)



<table><tr><td id="cell43">
Original text
</td></tr></table>

<button
onclick="document.getElementById(''cell43'').innerHT ML=
''New words''">
Change cell 43</button>
--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)


这篇关于如何更改显示的文字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 05:45