如何在html程序中显示div id [英] how to display div id in a html program
本文介绍了如何在html程序中显示div id的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
i有一个html程序,有400个div ID,每个显示一定的信息,供用户选择两个/三个事件中的一个到发生。
现在我希望显示div ID以便我可以查看导航链接
这里是一个样本
hi to all,
i have a html program which has 400 div ids and each display a certain info for the user to choose one of two/three events to occur .
now i want the div ids to be displayed so that i can check the navigation links
here is a sample
<Div ID="1" CLASS="text">
<P>hello to all. choose difficulty level :-
a) easy<BR>
b) moderate<BR>
c) hard</P>
</DIV>
i希望1显示在文本hello之上。类似地,所有400个ID都需要显示
提前感谢
rudhra
i want 1 to be displayed above the text hello.similarly all 400 ids are needed to be displayed
thanks in advance
rudhra
推荐答案
没有HTML程序这样的东西。
你可以在HTML文档中进行DOM操作,只有当你包含一些JavaScript时它,使用HTML元素< script>
。
当你学习JavaScript和DOM时,它相对容易:
http://en.wikipedia.org/wiki/JavaScript [ ^ ],
https://developer.mozilla.org/en-US/docs/Web/JavaScript [ ^ ],
https://developer.mozilla.org/en-US/ docs / Web / API / Document_Object_Model [ ^ ],
https:// developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction [ ^ ],
http://en.wikipedia.org/wiki/JavaScript [ ^ ]。
-SA
There is no such thing as "HTML program", period.
You can do DOM manipulation inside an HTML document, only if you include some JavaScript in it, using the HTML element<script>
.
When you learn JavaScript and DOM, it's relatively easy:
http://en.wikipedia.org/wiki/JavaScript[^],
https://developer.mozilla.org/en-US/docs/Web/JavaScript[^],
https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model[^],
https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Introduction[^],
http://en.wikipedia.org/wiki/JavaScript[^].
—SA
这篇关于如何在html程序中显示div id的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文