stargik
V2EX  ›  HTML

分析页面搜索引擎 提取搜索串

  •  
  •   stargik · Feb 7, 2015 · 4159 views
    This topic created in 4141 days ago, the information mentioned may be changed or developed.

    <form action="" method="get" name="query_form" onsubmit="submit_query_form();return false" style="padding-right:135px" _lpchecked="1">
    <input type="text" name="site" id="site" class="input_02" size="40" autocomplete="off" onclick="DisplayAllSitesBox()" value="">
    像这样的是不是提取不出带问号的搜索串 method=get

    v2ex的好像不能提取 没有action
    <form onsubmit="return dispatch()" _lpchecked="1">
    <input type="text" maxlength="40" name="q" id="q" value="">

    维基百科的可以
    <form action="/w/index.php" id="searchform">
    <input type="search" name="search" placeholder="搜索" title="搜索维基百科[alt-shift-f]" accesskey="f" id="searchInput" tabindex="1" autocomplete="off">
    提取为http://zh.wikipedia.org/w/index.php?search=%s

    3 replies    2015-02-07 17:46:40 +08:00
    aaaa007cn
        1
    aaaa007cn  
       Feb 7, 2015
    aaaa007cn
        2
    aaaa007cn  
       Feb 7, 2015
    忘说了
    如果 onsubmit 中找不到相关提交地址,或者 return false 了
    那么就用当前页面地址作为 action 的值
    http://www.w3schools.com/html/html_forms.asp
    见 The Action Attribute 这节
    aaaa007cn
        3
    aaaa007cn  
       Feb 7, 2015
    >> 如果 onsubmit 中找不到相关提交地址,或者 return false 了
    >> 那么就用当前页面地址作为 action 的值
    如果没有设置 action,并且 onsubmit 中找不到相关提交地址,onsubmit 也没有 return false
    那么就用当前页面地址作为 action 的值
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2607 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 16:01 · PVG 00:01 · LAX 09:01 · JFK 12:01
    ♥ Do have faith in what you're doing.