[英]Can I use javascript library codes inside HTML file instead of referencing it?
Is it possible to copy and paste a javascript library's code inside a HTML file? 是否可以将JavaScript库的代码复制并粘贴到HTML文件中?
I asked because I'm trying to make an app that needs angularjs but due to restrictions at work, I cant reference it to an angularjs file externally regardless if its over the internet or intranet. 我之所以问是因为我正在尝试制作一个需要angularjs的应用程序,但是由于工作限制,无论它是通过Internet还是通过Intranet,我都无法从外部将其引用到angularjs文件。
I appreciate your help. 我感谢您的帮助。
Thanks 谢谢
Yes this is possible but very much not recommended. 是的,这是可能的,但是非常不推荐。
This can be done the following way using the <script>
tag: 可以使用
<script>
标签通过以下方式完成此操作:
<body>
<p>This is HTML bla bla bla...</p>
</body>
<script type="text/javascript">
//Put your JS code here
</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.