在aspx页面中如何引用js文件?
如题。
string MyJavaScriptFile = " <script src=\ "/001/\ "js.js\ "> </script> ";
Page.ClientScript.RegisterClientScriptBlock(this.GetType (), "dfdf ", MyJavaScriptFile);
不成功。
------解决方案--------------------路径对不对
------解决方案--------------------string MyJavaScriptFile = " <script src=\ "001/js.js\ "> </script> ";
Page.ClientScript.RegisterClientScriptBlock(this.GetType (), "dfdf ", MyJavaScriptFile);
或者
string MyJavaScriptFile = " <script src=‘001/js.js’> </script> ";
Page.ClientScript.RegisterClientScriptBlock(this.GetType (), "dfdf ", MyJavaScriptFile);
------解决方案-------------------- <script language= "javascript " src= "..\_script\Calendar30.js "> </script>
src 后是年的路径 根据实际写
------解决方案--------------------LZ是想动态引用js文件?