x
 
<!DOCTYPE html>
<html>
<body>
<p>单击该按钮可创建一个 URL 字段。</p>
<button onclick="myFunction()">试一试</button>
<script>
function myFunction() {
  var x = document.createElement("INPUT");
  x.setAttribute("type", "url");
  x.setAttribute("value", "https://www.w3school.com.cn");
  document.body.appendChild(x);
}
</script>
</body>
</html>