single.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. {{ partial "head.html" . }}
  5. <!-- <script
  6. src="https://code.jquery.com/jquery-3.3.1.js"
  7. integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
  8. crossorigin="anonymous"></script> -->
  9. </head>
  10. <body>
  11. {{ partial "nav.html" . }}
  12. <div class="container contact-form">
  13. <!-- <form
  14. id="myForm"
  15. action="https://script.google.com/a/macros/choozmo.com/s/AKfycbyUnjyXnSfzueA_RGbfLUphh1f7qv1RBzNvLLBErhB-zBcxEBYacQx2M9KEbavB5HNT/exec"
  16. method="get">
  17. <span>姓名:</span><input type="text" name="name" placeholder="姓名" /><br />
  18. <span>年齡:</span><input type="text" name="age" placeholder="年齡" /><br />
  19. <input type="submit" value="確認送出" />
  20. </form> -->
  21. <!-- <div>
  22. <span>您的大名:</span><input id="nameValue" type="text">
  23. </div>
  24. <div>
  25. <span>您的電話:</span><input id="phoneValue" type="text">
  26. </div>
  27. <div>
  28. <span>您的需求:</span><input id="demandValue" type="text">
  29. </div>
  30. <button>送出</button> -->
  31. <h2>客服聯絡表單</h2>
  32. <span class="line"></span>
  33. <div class="row">
  34. <div class="col-6">
  35. <form class="row g-3">
  36. <div class="col-12">
  37. <label for="nameValue" class="form-label">姓名</label>
  38. <input type="text" class="form-control" id="nameValue" required>
  39. </div>
  40. <div class="col-12">
  41. <label for="emailValue" class="form-label">Email</label>
  42. <input type="email" class="form-control" id="emailValue" required>
  43. </div>
  44. <div class="col-md-6">
  45. <label for="EZwayValue" class="form-label">EZway 分提單號(必填)</label>
  46. <input type="text" class="form-control" id="EZwayValue" required>
  47. </div>
  48. <div class="col-md-6">
  49. <label for="phoneValue" class="form-label">手機號碼</label>
  50. <input type="tel" class="form-control" id="phoneValue" required>
  51. </div>
  52. <div class="col-12 mt-4 form-floating">
  53. <textarea class="form-control" placeholder="Leave a comment here" id="demandValue"
  54. style="height: 100px"></textarea>
  55. <label for="demandValue" class="pt-3 ps-4">留言</label>
  56. </div>
  57. <div style="height: 15px;">
  58. <span class="errorText text-danger">請確實填寫欄位</span>
  59. </div>
  60. <div class="col-12">
  61. <button class="btn">
  62. <span class="loading-btn">
  63. <span class="spinner-border spinner-border-sm me-1" role="status" aria-hidden="true"></span>
  64. </span>
  65. 送出
  66. </button>
  67. </div>
  68. </form>
  69. </div>
  70. <div class="col-6">
  71. <h3>客服中心:</h3>
  72. <p>長慶運通與客戶及合作夥伴長期以來建立穩定的關係共同成長,我們樂於了解客戶的需求,協助客戶找到最佳物流方案。</p>
  73. <p class="my-3">
  74. 優秀的人力,服務的熱忱。 <br>
  75. 提供完備服務,如行政處理、包裹查詢、簡易報關資料蒐集處理等相關服務。 <br>
  76. 安心委託,實質服務。
  77. </p>
  78. <p>
  79. 服務時間:週一至週五,09:00 ~ 18:00(例假日休息) <br>
  80. 對於營業需求、問題洽詢、業務合作及異業結合 <br>
  81. 歡迎您 E-mail 至我們的客服信箱詢問: <br>
  82. <strong>E-mail:service@jet-f.com</strong> <br>
  83. 我們將盡快回覆您的需求及問題!
  84. </p>
  85. </div>
  86. </div>
  87. </div>
  88. {{ partial "footer.html" . }}
  89. <script>
  90. const scriptURL = 'https://script.google.com/macros/s/AKfycbzUnEWSNroTONS6dHWC6EoyIeQX0GNFJ7LGoN-inR9JM-PoCIgdNzuggVSEDR5r78sN/exec';
  91. function send() {
  92. console.log('addEventListener');
  93. let name = document.querySelector('#nameValue').value;
  94. let email = document.querySelector('#emailValue').value;
  95. let ezway = document.querySelector('#EZwayValue').value;
  96. let phone = document.querySelector('#phoneValue').value;
  97. let demand = document.querySelector('#demandValue').value;
  98. if (name === "" || email === "" || ezway === "" || phone === "") {
  99. $('.errorText').show();
  100. return;
  101. } else {
  102. $('.loading-btn').show();
  103. $('.errorText').hide();
  104. }
  105. $.ajax({
  106. url: scriptURL,
  107. data: {
  108. "name": name,
  109. "email": email,
  110. "ezway": ezway,
  111. "phone": phone,
  112. "demand": demand
  113. },
  114. success: function (response) {
  115. if (response == "成功") {
  116. $('.loading-btn').hide();
  117. alert("成功提交!");
  118. }
  119. },
  120. });
  121. };
  122. $('button').on('click', function (e) {
  123. e.preventDefault();
  124. send();
  125. });
  126. </script>
  127. </body>
  128. </html>