有两个页面,一个htm,一个ASP.Net。
现在我用ASP.Net 后台调用htm里面的里面的js函数?????
现在我用ASP.Net 后台调用htm里面的里面的js函数?????
解决方案 »
- 求助一个小问题 !
- 基类包括字段“page”,但其类型(System.Web.UI.Page)与控件(System.Web.UI.WebControls.DropDownList)
- ++count; count++; 异同?
- 代码出问题了,快!
- 问一下各位有经验的人,提供这样的服务有没有市场?谢谢
- 论坛写了一个星期了,快完成了,大家评评
- 菜鸟50分请教HyperLinkColumn 问题
- 关于treeview和框架结合的问题
- 本人新建一个.net的交流群.进来看看吧
- gridview 按条件查询遇到的问题?急、急、急!
- 怎样控制字符的显示个数?希望两分钟分搞定,全靠各位大哥大姐了.......
- 一个关于文章内容显示得简单问题,在线等....
<head>
<title>无标题页</title>
</head>
<body>
<script>
function tt(){alert(1)}
</script>
</body>
</html>
default.aspx protected void Page_Load(object sender, EventArgs e)
{
System.Net.WebClient wc = new System.Net.WebClient();
string s = wc.DownloadString("http://localhost:2528/WebSite1/1.htm");
System.Text.RegularExpressions.Regex re=new System.Text.RegularExpressions.Regex("<script[^>]*>[^<]*<\\/script>",System.Text.RegularExpressions.RegexOptions.IgnoreCase);
string functions="tt";//函数名
System.Text.RegularExpressions.MatchCollection mcl= re.Matches(s, 0);
for (int i = 0; i < mcl.Count; i++)
{
Response.Write(mcl[i].Value);
}
Response.Write("<script>" + functions + "();</script>");
}弹出1