2014-03-02 45 views
0

有谁知道如何在W3C HTML 5验证添加到我的网站。(所以我有直接的联系,检查我的网页验证)加入W3C HTML5验证网站

感谢

+1

不要打扰;验证器令用户感到困惑,并且只需添加更多需要更多时间加载的字节。 –

+0

这是一项任务?什么是任务?你有什么尝试? – putvande

回答

0

你通过网址传递:

http://validator.w3.org/check?uri=www.google.com 

我很好奇你为什么需要这个链接在你的页面上。

+1

这是一个大学作业,讲师想要一个直接链接到验证器,以便他可以检查它验证很快。 – user3371086

+1

那是一位非常懒惰的教授。祝你好运。 –

0

像这样的东西应该工作 -

$('#validation').attr('href','http://validator.w3.org/check?uri='+window.location.pathname); 


<a href="" id="validation">Validation</a> 

编辑顶线 - 希望帮助!

-1
<script type="text/javascript"> 
    window.onload =function() { 
    var submitbutton = document.getElementById("q"); 
    if (submitbutton.addEventListener) { 
     submitbutton.addEventListener("click", function() { 

    if (submitbutton.value == 'Validate') { 
       submitbutton.value = ''; 
      } 
     }); 
    } 
} 
</script> 


<div id="header"> 
    <form action="http://validator.w3.org/check" id="newsearch" method= 
    "get" name="newsearch"> 
     <input class="textinput2" id="q" maxlength="120" name="uri" 
     placeholder="Enter URL" size="21" type="text"> <input class= 
     "button2" type="submit" value="Validate"> 
    </form> 

    <div class="clear"></div> 
</div>