Posted on 2006-04-14 17:15 阅读(249) 网摘 所属分类:
1.用request方法从页面取得数据若包含html格式数据,则会提示出错,解决方法为:在web.config中<system.web>中增加<pages validateRequest="false"></pages>即可
2. 若页面使用了iframe,若要获得iframe中的控件内容,如下:
editor 为一frame的ID,Composition为editor中包含的另一frame的ID,
document.frames("editor").frames("Composition").document.body.innerHTML;
一般使用在新闻或文字类的编辑功能中,此时,在页面增加一隐藏的input控件,然后在iframe中增加事件,最后在后台通过request获取隐藏控件的值即可。
隐藏的控件:
iframe:
2. 若页面使用了iframe,若要获得iframe中的控件内容,如下:
editor 为一frame的ID,Composition为editor中包含的另一frame的ID,
document.frames("editor").frames("Composition").document.body.innerHTML;
一般使用在新闻或文字类的编辑功能中,此时,在页面增加一隐藏的input控件,然后在iframe中增加事件,最后在后台通过request获取隐藏控件的值即可。
隐藏的控件:
1
后台取值:Request["WebEditor1"].ToString()