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

2015-02-07 16:37:17 +08:00
 stargik

<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

3599 次点击
所在节点    HTML
3 条回复
aaaa007cn
2015-02-07 17:13:19 +08:00
aaaa007cn
2015-02-07 17:31:45 +08:00
忘说了
如果 onsubmit 中找不到相关提交地址,或者 return false 了
那么就用当前页面地址作为 action 的值
http://www.w3schools.com/html/html_forms.asp
见 The Action Attribute 这节
aaaa007cn
2015-02-07 17:46:40 +08:00
>> 如果 onsubmit 中找不到相关提交地址,或者 return false 了
>> 那么就用当前页面地址作为 action 的值
如果没有设置 action,并且 onsubmit 中找不到相关提交地址,onsubmit 也没有 return false
那么就用当前页面地址作为 action 的值

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/169068

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX