Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/460.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用javascript在chrome或safari中强制打开instagram帖子中的URL?_Javascript_Facebook_Url_Instagram_Getusermedia - Fatal编程技术网

如何使用javascript在chrome或safari中强制打开instagram帖子中的URL?

如何使用javascript在chrome或safari中强制打开instagram帖子中的URL?,javascript,facebook,url,instagram,getusermedia,Javascript,Facebook,Url,Instagram,Getusermedia,我们有一个web应用程序,它具有用于摄像头访问的getusermedia 当我点击instagram或facebook移动应用程序上的网站url时,它不允许使用摄像头。如何使url在chrome或其他浏览器而不是instagram应用程序中打开?创建shell并尝试运行url 这在我的系统上对我有效(另存为whater.hta并执行它)。单击该按钮可在Firefox中打开Google: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "

我们有一个web应用程序,它具有用于摄像头访问的getusermedia


当我点击instagram或facebook移动应用程序上的网站url时,它不允许使用摄像头。如何使url在chrome或其他浏览器而不是instagram应用程序中打开?

创建shell并尝试运行url

这在我的系统上对我有效(另存为whater.hta并执行它)。单击该按钮可在Firefox中打开Google:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
  <title>HTA Test</title>
  <hta:application applicationname="HTA Test" scroll="yes" singleinstance="yes">
  <script type="text/javascript">
  function openURL()
  {
      var shell = new ActiveXObject("WScript.Shell");
      shell.run("http://www.google.com");
  }
  </script>
</head>
<body>

<input type="button" onclick="openURL()" value="Open Google">

</body>
</html>

HTA试验
函数openURL()
{
var shell=新的ActiveXObject(“WScript.shell”);
shell.run(“http://www.google.com");
}

如果我在笔记本电脑上运行hta文件,它就会工作。但当我在instagram应用程序上点击open chrome时,却没有打开chrome