“测试20”的版本间差异

来自珠海交通维基
跳到导航 跳到搜索
第37行: 第37行:
 
         function searchImage() {
 
         function searchImage() {
 
             const input = document.getElementById('searchInput').value;
 
             const input = document.getElementById('searchInput').value;
             const imageUrl = `https://w.zhbus.org/images/thumb/0/07/%E6%B9%96%E5%BF%83%E8%B7%AF%E5%8F%A3520.jpg/${encodeURIComponent(input)}.jpg`;
+
             const imageUrl = `https://……/${encodeURIComponent(input)}.jpg`;
 
             const imgElement = document.getElementById('resultImage');
 
             const imgElement = document.getElementById('resultImage');
 
              
 
              
第43行: 第43行:
 
             imgElement.onerror = function() {
 
             imgElement.onerror = function() {
 
                 this.style.display = 'none';
 
                 this.style.display = 'none';
                 alert('图片未找到');
+
                 alert('您查找的车辆不存在或尚未入库,请重新输入');
 
             }
 
             }
 
             imgElement.onload = function() {
 
             imgElement.onload = function() {

2025年2月28日 (五) 09:14的版本

图片搜索

搜索结果