zoukankan      html  css  js  c++  java
  • aspx.net后台调用前台JS方法

    方法1:

       ScriptManager.RegisterStartupScript(this.Button1, this.GetType(), "alertScript", "window.open('default2.aspx');", true); 其中第一个参数为要注册脚本的控件ID,试了一下,只要是本页面的就行。  第二个参数为注册脚本控件类型,是控件还是this的GetType()都可以,typeOf(string)也没问题. 第三个脚本

    方法2:

    Page.RegisterStartupScript("2013","<script>seData();</script>");//调用前台JS方法

    以上方法效果一样

  • 相关阅读:
    两个List集合过滤出不同集合
    TypeError: Failed to execute 'fetch' on 'Window': Request with GET/HEAD method cannot have body.
    sql server 查询某个表被哪些存储过程调用
    SQL server字符分割
    oracle 结果集合并
    tree与GridView交互
    oracle job相关
    ImportFileHandler 附件上传
    dt转换List CovertListHelper
    node版本管理mac版
  • 原文地址:https://www.cnblogs.com/spring_wang/p/3120655.html
Copyright © 2011-2022 走看看