Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将我的整个 javascript 函数放在一个文件中(让我们说清楚,javascriptsample.js)。
我需要使用RegisterStartupScript在我的asp.net端使用该文件中的一个函数。
我怎样才能调用这个函数?
您必须javascriptsample.js在您的 aspx 页面中提供参考...
javascriptsample.js
之后你可以使用..
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tmp", "<script type='text/javascript'>JavascriptFunctionname();</script>", false);