且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用RegisterStartupScript调用jquery对话框?

更新时间:2023-12-05 23:16:10

当您在脚本标签中引用src ="js/jquery.js"这样的脚本文件时,脚本标签之间的内容将不会执行,并且从技术上讲是非法的.因此,您只需要将其分解为一个单独的脚本标签即可.这将起作用:

When you reference a script file in your script tag like src="js/jquery.js", what's in between the script tag will not be executed and it's technically illegal. So you just need to break that out into a separate script tag. This will work:

<script src="js/jQuery.js"></script>
<script type="text/javascript">
    alert('test');
</script> 

这不会:

<script src="js/jQuery.js">
    alert('test');
</script>