如何使用jquery和ajax进行基本身份验证?

时间:2016-10-31 01:42:40

标签: javascript jquery html ajax authentication

我正在尝试将ipcamera图像加载到我的网站,并且ip camera有自己的javascript来每秒加载图像。这里的问题是我每次访问该页面时都会被要求登录。

到目前为止,我已尝试过这种方法:http://username:password@samplewebsite.com。这仅适用于Firefox,但不适用于chrome和其他浏览器。那么如何实现一种方法,允许所有浏览器在不登录的情况下查看此页面?

ipcamera javascript如下:

Number of CPU 8 
Process id of main 16874 

Process id of 0 go routine 16874 
Process id of 2 go routine 16874 
Process id of 1 go routine 16874 
Process id of 0 go routine 16874 
Process id of 1 go routine 16874 
Process id of 2 go routine 16874 
Process id of 0 go routine 16874 
Process id of 1 go routine 16874 
Process id of 2 go routine 16874 
Process id of 2 go routine 16874 
Process id of 0 go routine 16874 
Process id of 1 go routine 16874 

我听说过用ajax和jquery进行html身份验证的方法。但我不清楚如何做到这一点。

0 个答案:

没有答案