添加Javascript文件 [英] adding Javascript file

查看:56
本文介绍了添加Javascript文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个HTML代码来设计我的网站。并在项目中添加了一个java脚本文件,并通过以下代码链接:



< script src =functions.jstype =text / javascript >< / script>



但它实际上并没有链接到该文件。



应该是什么代码。



N:B:它是一个.aspx文件,在哪里添加js文件。



谢谢提前

解决方案

它只是一个路径问题。只需将js文件从解决方案资源管理器拖放到aspx页面,它就会自动采用正确的路径。



:)


< blockquote>参考:在ASP.NET中管理JavaScript库 [ ^ ]


以这种方式尝试。> :)



 <   script     language   =  javascript    type   =  text / javascript    src   =  functions.js >  <   /  脚本 >  





确保路径正确您项目中的js文件


I wrote a html code to design my website. and added a java script file in the project and also linked by the following code:

<script src="functions.js" type="text/javascript"></script>

but it didn't actually link with the file.

what should be the code.

N:B: its a .aspx file where to be added the js file.

Thanks in advance

解决方案

Its just a path issue. Just drag and drop the js file from your solution explorer to the aspx page it will automatically take the correct path.

:)


Refer: Managing Your JavaScript Library in ASP.NET[^]


Try in this way.> :)

<script language="javascript" type="text/javascript" src="functions.js"></script>



Make sure path in correct of js file in your project


这篇关于添加Javascript文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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