小编Use*_* 28的帖子

如何从 URL 获取元数据

我刚刚开始使用java脚本,我想从URL中获取元数据...当在输入字段中输入任何URL时,它必须从中提取元数据,这是执行时在html java脚本中使用的基本用法代码抛出错误

我正在寻找任何替代方案,但没有任何帮助。请提供如何实现该功能的任何想法。

<!DOCTYPE html>
    <html>
    <body>
    <head>
      <meta name="description" content="Free Web tutorials">
      <meta name="keywords" content="HTML5,CSS,JavaScript">
      <meta name="author" content="John Doe">
      <meta content="http://stackoverflow.com/favicon.ico">
    </head>
    
    <p>Click the button to return the value of the content attribute of all meta elements.</p>
    
    <button onclick="myFunction()">Try it</button>
    
    <p id="demo"></p>
    
    <script>
    function myFunction() {
        var x = "https://www.amazon.in/"
      // var x = document.getElementsByTagName("META");
      var txt = "";
      var i;
      for (i = 0; i < x.length; i++) {
        txt = txt + "Content of "+(i+1)+". meta tag: …
Run Code Online (Sandbox Code Playgroud)

html javascript

5
推荐指数
1
解决办法
2万
查看次数

在IE中使用媒体查询时,CSS动画无法正常工作

我使用像这样的 CSS动画和媒体队列 !

HTML
<div class='block'>
    <div class='block-bar'></div>
</div>
CSS
    .block-bar {
        -webkit-animation: timebar 1s infinite;
        -moz-animation: timebar 1s infinite;
        animation: timebar 1s infinite;
    }
    @keyframes timebar {
        0% { width: 0%; }
        99% { width: 100%; }
        100% { width: 0%; }
    }
   @-webkit-keyframes timebar {
        0% { width: 0%; }
        99% { width: 100%; }
        100% { width: 0; }
    }
}
Run Code Online (Sandbox Code Playgroud)

它在Chrome和Firefox中正常工作但在IE中无法正常工作

怎么解决?谢谢.

html css css3

4
推荐指数
1
解决办法
1495
查看次数

标签 统计

html ×2

css ×1

css3 ×1

javascript ×1