Miles 10 лет назад
Родитель
Сommit
7e26feefac
2 измененных файлов с 10 добавлено и 4 удалено
  1. 9 3
      index.php
  2. 1 1
      u2s.php

+ 9 - 3
index.php

@@ -44,6 +44,10 @@
 	border-color: #2e6da4;
 	margin-left: 10px;
 }
+
+#resdiv {
+	margin: 15px 0;
+}
 </style>
 <script type="text/javascript">
         $(document).ready(function () {
@@ -52,7 +56,7 @@
                 $.ajax({
                     //cache: true,
                     type: "POST",
-                    url: 'u2s.php',//提交的URL
+                    url: 'u/u2s.php',//提交的URL
                     data: $('#shorturl').serialize(), // 要提交的表单,必须使用name属性
                     //async: false,                    
                     success: function (data) {
@@ -72,11 +76,13 @@
             });
         });        
 </script>
-<h2>请输入需要转换的网址</h2>
+<p>请输入需要转换的网址(如 https://www.solomp.com),务必添加<b>http</b>或<b>https</b>前缀<p>
+<div id="urlform">
 <form id="shorturl" action method="POST">
 	<input type="text" id="url" name="url" class="css-input">
 	<button class="btn" id="button">提交</button>
 </form>
-<div>
+</div>
+<div id="resdiv">
 	<input id="res" readonly="true" placeholder="输出结果" />
 </div>

+ 1 - 1
u2s.php

@@ -29,7 +29,7 @@ catch (Exception $e) {
 //     header("Location: index.php");
     $arr = array(
     		'status' => 0,
-    		'msg' => "地址有误",
+    		'msg' => "地址有误",
     );
     echo json_encode($arr);
     exit;