zoukankan      html  css  js  c++  java
  • ajax

    一般:

    1.在html中写js可用

    1). url: "{:url('index/Goods/getGoods')}" 

    2). url: "getGoods" 

    2.引入的js文件中 只能用 2

    特别:

    1.form表单 产生链接:http://plat.domall.cc/index/goods/index?sign=chaoshi&search=空调

    <form action="{:url('index/goods/index')}" method="get" class="form-search ">

    2.a标签,产生链接:http://plat.domall.cc/index/goods/index/sign/chaoshi/search/空调

    <a href="{:url('index/goods/index', array('sign'=>$webpage->sign, 'search'=> $search))}">全部结果</a>

    特别注意2产生的链接,当在2中产生的链接再进行操作时,在html中js的url无影响,引入的js文件中1)和2)都会生成错误链接:

    http://plat.domall.cc/index/goods/index/sign/chaoshi/search/url: "{:url('index/Goods/getGoods')}" 

    http://plat.domall.cc/index/goods/index/sign/chaoshi/search/getGoods

    暂时还没有找到解决办法,只能将引入js文件中用到url的代码移到html中,(⊙﹏⊙)

  • 相关阅读:
    Vue项目搭建及原理三
    Vue项目搭建及原理一
    JS Cookie丢失问题
    1027 Colors in Mars
    1028 List Sorting
    1029 Median
    1030 Travel Plan
    1031 Hello World for U
    1032 Sharing
    1033 To Fill or Not to Fill
  • 原文地址:https://www.cnblogs.com/wangyuyanhello/p/7985504.html
Copyright © 2011-2022 走看看