如何在asp.net中添加javascript或js [英] how to add javascript or js in asp.net

查看:108
本文介绍了如何在asp.net中添加javascript或js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,我如何将  javascript文件添加到asp.net  
sir how can I add  javascript file to a external source code in asp.net  

推荐答案

有关在asp.net中添加JavaScript的不错的CodeProject文章,网址为:在ASP.NET中管理JavaScript库 [
Nice CodeProject article to add JavaScript in asp.net at: Managing Your JavaScript Library in ASP.NET[^]


从您的解决方案资源管理器中右键单击添加新文件夹"
然后重命名脚本",然后右键单击创建的文件夹名称脚本"
然后添加->然后将弹出新项",然后显示"Web",然后再次选择名称"JScript1.js",然后将您的代码放在JScript1.js中.

别忘了将您的脚本引用到母版页oki

投票并接受
如果这对您有帮助
谢谢
from your solution Explorer right click Add "New folder"
then rename "Script" then right click the created Folder name "Script"
then add -> New Item then pop up will show then choose "Web" and choose again name "JScript1.js" then place your code in JScript1.js

don''t forget to reference your script to masterpage oki

vote and accept
if this will help you
thanks


在关闭标题标签后在设计页面中,您可以使用像这样的Java脚本
in your design page after closing of title tag you can use java script like this
<script type="text/javascript" language="javascript">
your code goes here...
</script>



对于使用jscript,请转到解决方案资源管理器窗口并添加新项,您可以选择jscript,然后在网页中使用它.



and for using jscript go to your solution explorer window and add new item in that you can select jscript and you can use it in the web page.


这篇关于如何在asp.net中添加javascript或js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆