国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > HTML > 正文

在服務(wù)器端得到可編輯Iframe的HTML源代碼

2024-08-26 00:15:38
字體:
供稿:網(wǎng)友
   下面的這個例子實現(xiàn)了在服務(wù)器端得到可編輯iframe的html源代碼非典功能。代碼很簡單,這里疾苦不多解釋了。代碼如下:
  
  getiframehtml.axpx
  
  <%@ page language="<a target="_blank">vb</a>" validaterequest=false autoeventwireup="false"
   codebehind="getiframehtml.<a target="_blank">asp</a>x.vb" inherits="aspx<a target="_blank">web</a>.getiframehtml"%>
  <html>
   <body>
   <form id="frmmain" method="post" runat="server">
   <iframe id="ifrhtml" name="ifrhtml"></iframe>
   <br>
   <asp:button id="cmdsend" runat="server" text=" 提 交 "></asp:button>
   <input type="hidden" name="hidvalue">
   </form>
   <script>
   ifrhtml.document.designmode = "on";
   </script>
   </body>
  </html>
  
  
  getiframehtml.aspx.vb
  
  public class getiframehtml
   inherits system.web.ui.page
   protected withevents cmdsend as system.web.ui.webcontrols.button
   protected withevents ifrhtml as system.web.ui.htmlcontrols.htmlgenericcontrol
  
  #region " web form designer generated code "
  
   'this call is required by the web form designer.
   <system.diagnostics.debuggerstepthrough()> private sub initializecomponent()
  
   end sub
  
   private sub page_init(byval sender as system.object,_
   byval e as system.eventargs) handles mybase.init
   'codegen: this method call is required by the web form designer
   'do not modify it using the code editor.
   initializecomponent()
   end sub
  
  #end region
  
   private sub page_load(byval sender as system.object,_
   byval e as system.eventargs) handles mybase.load
   cmdsend.attributes.add("onclick", "document.frmmain.hidvalue.value" + _
   " = ifrhtml.document.body.innerhtml;")
   end sub
  
  
   private sub cmdsubmit_click(byval sender as system.object,_
   byval e as system.eventargs) handles cmdsend.click
   dim strvalue as string
   strvalue = request.form("hidvalue")
   response.write(server.htmldecode(strvalue))
   end sub
  
  end class注冊會員,創(chuàng)建你的web開發(fā)資料庫,
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 湟源县| 清徐县| 高要市| 沈丘县| 新绛县| 盐源县| 齐河县| 宜宾县| 麻栗坡县| 元氏县| 开封市| 溆浦县| 沙坪坝区| 景泰县| 沁阳市| 临桂县| 三原县| 丰台区| 扬州市| 台南市| 崇左市| 鹤山市| 苍南县| 定安县| 呼和浩特市| 黄山市| 治县。| 固阳县| 牙克石市| 饶阳县| 霞浦县| 集安市| 乌海市| 聂拉木县| 额尔古纳市| 民丰县| 英德市| 阳信县| 峨边| 吉安市| 巴马|