更新时间:2023-12-05 23:20:52
当您使用的RegisterClientScriptBlock
JavaScript的code在页面年初插入,所以它会加载的内容之前运行。
When you use RegisterClientScriptBlock
the Javascript code is inserted early in the page, so it will run before the elements are loaded.
使用的RegisterStartupScript
来代替,哪个地方code。在表单的结尾。
Use RegisterStartupScript
instead, which places the code at the end of the form.