boxmoe_header_banner_img

Hello! 欢迎来到众归云!

文章导读

手把手教你做域名备案查询网站


avatar
王道 2024年7月9日 3

<!DOCTYPE html>
<html>
<head>
<meta charset=”utf-8″ />
<title>weather</title>
<script src=”https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js”></script>

</head>
<body>
<h1>域名查询</h1>
<input type=”text” placeholder=”请输出域名” id=”url”/>
<button id=”ajax”>查询</button>

<p><span id=”result”></span></p>
<p><span id=”domain”></span></p>
<p><span id=”times”></span></p>

[pax money=5]

<script type=”text/javascript”>
$(function(){
$(‘#ajax’).on(‘click’,function(){
var $urlValue = $(‘#url’).val();
if($urlValue == “”) {
alert(‘不能为空!’);
return;
}
$.ajax({
type: ‘GET’,
dataType: ‘json’,
url: ‘https://api.suyanw.cn/api/filings.php?url=’ + encodeURIComponent($urlValue),
success: function(data){
var reslutData = data.data;
console.log(reslutData);
$(‘#result’).text(“你查询的是: ” + reslutData.icp); // 假设字段是icp
$(‘#domain’).text(“域名是 ” + reslutData.domain);
$(‘#times’).text(“审核日期是 ” + reslutData.unitName); // 假设unitName是审核日期
},
error: function(jqXHR, textStatus, errorThrown) {
alert(‘请求失败: ‘ + textStatus + ‘, 错误: ‘ + errorThrown);
}
});
});
});

[/pax]
</script>
</body>

</html>

最终展示结果:http://tool.20115.net/icp

 



评论(0)

查看评论列表

暂无评论


发表评论

表情 颜文字
插入代码