Posted by bianbian on 2007-11-16 10:02
本文Tags: JavaScript, 淘宝, 自动
自动发货的又要改了。
现在淘宝的发货页面用了Yahoo UI Library,每个按钮都用了后期事件绑定,每个事件又和很多代码相关,于是分析起来比较困难。估计是故意的。
经过1个小时的代码分析。终于搞定。
其实偷偷告诉大家,不需要分析那些事件到底改动了哪些form里的数值。
因为我们的脚本能控制页面的所有元素,把form改成我们需要的样子submit上去就OK了。
帖主要代码:
- //发货
- gFrm["_fmu.g._0.goo"].value = gTips[gID];
- //先把页面里的几个发货单全删了
- $(d, "reComPartners").parentNode.removeChild($(d, "reComPartners"));
- $(d, "otherPartners").parentNode.removeChild($(d, "otherPartners"));
-
- var div = d.createElement("DIV");
- var divHTML;
- if (gID <= 1) //邮政
- {
- divHTML = '<input type="hidden" name="companyCode1" value="POST"/>' +
- '<input type="hidden" name="checked1" class="hidden logis:chooseCompanyId" value="true" />' +
- '<input name="mailNo1" value="' + (gID > 0 ? hh : "POST") + '" />';
- gFrm["methordId"].value = 0;
- }
- else if (gID == 4) //韵达
- {
- divHTML = '<input name="orderType" type="hidden" value="2" />' +
- '<input type="hidden" name="companyId" value="102"/>' +
- '<input type="hidden" name="companyCode" value="YUNDA"/>' +
- '<input type="hidden" name="checked" class="hidden logis:chooseCompanyId" value="true" />' +
- '<input name="mailNo" value="' + hh + '" />';
- gFrm["methordId"].value = 1;
- }
- else if (gID == 2) //南京100
- {
- divHTML = '<input name="companyCode1" value="OTHER" />' +
- '<input value="南京壹零零速递" name="companyName"/>' +
- '<input name="checked1" value="true">' +
- '<input name="mailNo1" value="' + hh + '" />';
- gFrm["methordId"].value = 0;
- }
-
- div.innerHTML = divHTML;
- gFrm.appendChild(div);
- gFrm.submit();
标签:
JavaScript,
淘宝,
自动遵守创作共用协议,转载请链接形式注明来自
http://bianbian.org 做人要厚道
相关日志
Posted in JavaScript, Technology | No Comments »
Posted by bianbian on 2007-11-16 06:43
本文Tags: GPL
现在好东西真多,当了很多年sourceforge的下载党了。。。。
今天先推荐一个:http://www.wxwidgets.org/
wxWidgets lets developers create applications for Win32, Mac OS X, GTK+, X11, Motif, WinCE, and more using one codebase. It can be used from languages such as C++, Python, Perl, and C#/.NET. Unlike other cross-platform toolkits, wxWidgets applications look and feel native. This is because wxWidgets uses the platform’s own native controls rather than emulating them. It’s also extensive, free, open-source, and mature.
Distributed FTP Daemon
A distributed FTP daemon written in java. Instead of conventional server<->client transfer it uses master<->client for control connections and slave<->client for (most) data transfers, the master must tell the slave to initiate/respond to a transfer
sharehound
Sharehound is a network file systems indexer and searcher written in Java. Currently supports SMB file shares (i.e. MS Windows-based shares) and FTP resources. Web UI is used for search and crawl monitoring. RSS feed is provided for search results.
compass
Compass is a first class open source Java Search Engine Framework, enabling the power of Search Engine semantics to your application stack decoratively. Built on top of the amazing Lucene Search Engine, Compass integrates seamlessly to popular development frameworks like Hibernate and Spring. It provides search capability to your application data model and synchronizes changes with the datasource. With Compass: write less code, find data quicker.
As of version 0.8, Compass also provides a Lucene Jdbc Directory implementation, allowing storing Lucene index within a database for both pure Lucene applications and Compass enabled applications. Note, when using Compass, using a database as the index storage requires only updating configuration settings.
标签:
GPL遵守创作共用协议,转载请链接形式注明来自
http://bianbian.org 做人要厚道
相关日志
Posted in Technology | 1 Comment »