【发布时间】:2017-05-25 10:06:30
【问题描述】:
我在 .aspx 文件中有这个 javascript 函数。
<script>
function somefun(value)
{
}
<script>
我正在代码隐藏类中调用并将值传递给该函数。
ScriptManager.RegisterStartupScript(this, typeof(string), "Passing", String.Format("somefun('{0}');", filePath1), false);
但是当它运行时,该功能不能正常工作。我得到这样的打印输出
"somefun(变量的内容)"
会有什么问题?
【问题讨论】:
标签: c# javascript asp.net code-behind