页面启动时执行JS的问题。 我有一个用户控件,希望引用它的页面在每次onload时调用用户控件的一个JS函数。我不想在每个页面都去写这么一段。这个用户控件应该怎么写才能实现? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 JS函数写在.JS文件里,每个页面调用它就好了。 这个函数是服务器端动态注册的。已经可以用如下的方式注册上去string script = "<script language='javascript'>window.onload=function(){document.all(\"filepath\").Filepath = '"+url+"';}</script>";RegisterStartupScript("XmlFile",script);但是如何避免覆盖原有页面的Onload,我的页面都用到了onload事件,怎么追加上去? 请教:如何通过word解析HTML标签(急哦!) Response.Write 的括号与引号的问题 flash也能做网游?震撼 WinForm程序可以控制Web程序的Session吗? 求一正则表达式 XP系统下如何安装vs2003肯定能成功? 与mssql中"select * from a;select * from b;select * from c"对等的access语句是什么? 急~~~帮帮忙,sql语句问题 我没有错呀 类似wodewangzhan.com/yifangwanzhanming这样的访问 统计 怎么实现这个屏幕的刷新
已经可以用如下的方式注册上去
string script = "<script language='javascript'>window.onload=function(){document.all(\"filepath\").Filepath = '"+url+"';}</script>";
RegisterStartupScript("XmlFile",script);
但是如何避免覆盖原有页面的Onload,我的页面都用到了onload事件,怎么追加上去?