weixin_33693070 2013-09-07 19:12 采纳率: 0%
浏览 17

JavaScript / AJAX生成网址

I have no web developing experience at all so explanation with details would be appreciated! Let me know what other information if you think my questions is not clear.

I have a webpage, say the url looks like this:

www.mycompany.com/category1

And it contains a parametric search box. There is an apply button in the parametric search whose source code looks like this:

<input type="button" value="Apply" id="Button" class="button-link" style="color: rgb(0, 0, 0);">

It redirects you to another page after you click the apply button which contains the search results and the URL looks like:

http://www.mycompany.com/jsp/search/browse.jsp?N=2001109&No=0&getResults=true...

I took a look at the source code of the mycompany.com/category1 page and I cannot see the existence of the string '2001109' which looks like contains the information of my search..

I am wondering how is the URL generated?

It might be generated by JQuery/JavaScript/PHP..(I don't know any of these) and how could I locate the file which is used to generate the URL maybe using Chrome Web Developer Tools. Thanks a lot.

  • 写回答

1条回答 默认 最新

  • weixin_33725126 2013-09-07 19:26
    关注

    Your parametric search box will be in a html form tag <form> this is the default behavior of form if you don't specify the method attribute this will be assumed as the get method to request a server ,2001109 is the value of one of the <input> field within a form if you see the html of the form there will be an action attribute which tell where to send the form information which contains this http://www.mycompany.com/jsp/search/browse.jsp url as i said there was a get request method is used therefore all the information within input fields lie in the <form></form> will be appended in the url which commonly known as query string if your request method is defined as post then information within a form will not be appended in the url it will be in browser

    form

    html-get-vs-post

    Query_string

    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。