Duxcms Doccms 熱門關鍵詞代碼示例

                  Duxcms Doccms 熱門關鍵詞代碼示例

                  Duxcms:

                  <a href="javascript:;" onclick="javascript:post('{url('Article/Search/index')}', {id:1,keyword:'領導力培訓'})">領導力培訓</a>
                  <script type="text/javascript">
                  function post(url, params) {
                  var temp = document.createElement("form");
                  temp.action = url;
                  temp.method = "post";
                  temp.style.display = "none";
                  for (var x in params) {
                  var opt = document.createElement("textarea");
                  opt.name = x;
                  opt.value = params[x];
                  temp.appendChild(opt);
                  }
                  document.body.appendChild(temp);
                  temp.submit();
                  return temp;
                  }
                  </script>

                  Doccms:

                  <a href="javascript:;" onclick="javascript:post('/search/', {id:1,keyword:'<?php echo $data['title']; ?>'})"><?php echo $data['title']; ?></a>
                  <script type="text/javascript">
                  function post(url, params) {
                  var temp = document.createElement("form");
                  temp.action = url;
                  temp.method = "post";
                  temp.style.display = "none";
                  for (var x in params) {
                  var opt = document.createElement("textarea");
                  opt.name = x;
                  opt.value = params[x];
                  temp.appendChild(opt);
                  }
                  document.body.appendChild(temp);
                  temp.submit();
                  return temp;
                  }
                  </script>

                  a標簽里的關鍵詞自行替換為對應標簽,修改對應提交地址即可,JS是一樣的。

                  關鍵詞: 熱門關鍵詞代碼
                  2016-03-14 13:41:00 來源:本站 瀏覽:3900
                  關閉
                  先锋av资源网_先锋影音av电影_先锋影音av资源