脚本标签用户名密码? [英] Script-Tag with username Password?

查看:87
本文介绍了脚本标签用户名密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有没有办法做这样的事情?


有没有一种机制可以在加载文件时验证脚本标记?

 < script src =/ scripts / test.jsusername =userpassword =pw> 


解决方案

根据您的服务器设置,使用这样的URL:

  http://用户名:password@www.yourhost.com/whatever/script.js 

但是,如果您在HTML源代码中使用此硬编码,则整个身份验证事件完全没有任何意义。 。你知道这件事吗?


Is there a mechanism to authenticate a script tag when loading a file?

Is there a way to do something like this?

<script src="/scripts/test.js" username="user" password="pw">

解决方案

Depending on your server setup, maybe it'll work using a URL like this:

http://username:password@www.yourhost.com/whatever/script.js

But, if you have this hardcoded in your HTML source the whole authentication thing is completely without any sense... you are aware of this?

这篇关于脚本标签用户名密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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