问题描述
大家好,
我的项目有问题,问题是这样的。
我的aspx页面上有一个fckeditor,它从我在数据库中存储的编辑器中生成html代码。
之后我在下一页加载相同的html代码。
我想要做的是访问在html控件中存储/选择的值。
简单来说,我的问题是我想通过javascript或c#访问页面上的html控件,我的名字我不知道(因为我在运行时通过fckeditor插入它们)。
谢谢...
Hello everybody,
I have a problem in my project, the problem is like this.
I have a fckeditor on my aspx page which gets html code generated from this editor that I store in a database.
After that I load the same html code on next page.
What I want to do is to access the values which are stored/selected in the html controls.
In simpler terms, my problem is that I want to access the html controls on a page through javascript or c# whose name I dont know (as I inserted them on runtime through fckeditor).
thanks...
推荐答案
document.getElementsByTagName()
document.getElementsByName()
这些函数返回一组控件。您可以在网上找到大量关于这些JS功能的教程。
These are functions that return an array of controls. You can find tons of tutorials for these JS functions on the net.
for(int i=0;i<n;i++)><br />
{<br />
<br />
}
这篇关于如何访问在C#中通过fckeditor插入的html输入控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!