加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

如何在Asp.Net页面中包含Javascript文件

发布时间:2020-12-15 23:21:01 所属栏目:asp.Net 来源:网络整理
导读:我想在ASP.NET页面中使用 javascript做一些客户端验证. 我试过使用 script src =“../../../ JS / Registration.js”language =“javascript”type =“text / javascript”/ 但它不工作. 请帮忙. 解决方法 文件可能不在指定的路径中. ‘../../../’将移动3个
我想在ASP.NET页面中使用 javascript做一些客户端验证.

我试过使用

< script src =“../../../ JS / Registration.js”language =“javascript”type =“text / javascript”/>

但它不工作.
请帮忙.

解决方法

文件可能不在指定的路径中. ‘../../../’将移动3个步骤到页面所在的目录,并在名为JS的文件夹中查找js文件.

此外,语言属性已被弃用.

见Scripts:

07001

language = 07002 [07003]

07004 This attribute specifies
the scripting language of the contents
of this element. Its value is an
identifier for the language,but since
these identifiers are not standard,
this attribute has been 07005 in
favor of type.

编辑

尝试改变

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

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读