首页 > 常用服务 > ??????

??????

邮政编码查询服务工具,根据6位邮政编码进行城市查询。

 
请输入区号,然后点击搜索
<p>温馨提示:</p> <p>请输入邮政编码查询,然后点击搜索!</p>
<script> $(function (){ $("#btnSubmit").on('click', function () { var searchWord = $("#word").val().trim(); var templateNo = $('#word').data('tno'); if (searchWord !== "") { $.ajax({ url: "/api/commonapi.ashx?action=toolsearcharticle", type: "post", data: { "tno": templateNo, "word": searchWord, "st": "0", "key": "k", "client": "pc" }, dataType: 'json', timeout: 3000, success: function (data) { var htmlStr = ""; var count = data.length; if (count === 0) { htmlStr += "<p>未找到任何记录!</p>"; } else { htmlStr += "<p>已为您找到" + count + "条记录,请点击相应的链接进行查看!</p>"; htmlStr += "<ul>"; $.each(data, function (index, article) { htmlStr += "<li><a href='/zipcode/" + article.ArticleFileName + "/' target='_blank'>" + article.ArticleTitle + "</a></li>"; }); htmlStr += "</ul>"; } if ($('#SearchResult').length === 0) { $('#SearchTips').append('<div id="SearchResult" class="searchresult">' + htmlStr + '</div>'); } else { $('#SearchResult').html(htmlStr); } }, error: function (xhr, status, error) { console.error('AJAX错误:', status, error); } }); } }); $('#word').on('keypress', function (event) { if (event.keyCode === 13) { // 回车键 $("#btnSubmit").click(); } }); $.ajax({ url: "/api/commonapi.ashx?action=updatetoolhits&tno=zipcode&key=kk&client=pc", async: true }); }); </script>