
2014-07-05 &nb$&<sp;| 發布者:梁國(∞¶guó)芳 | &nb↔→≤♦sp; 查看(kàn):3320次✘∑↑β
phpgoogle了(le)下(xià)submit.x,得(deπσ×)到(dào)如(rú)下(xià)答(dá)案
根據圖形提交按鈕行(xíng)為(wèi)¥W3C的(de)描述 :
When a pointing device is used to c¥εlick on the image, the form isπΩ submitted and the cli↕ ♦ck coordinates passed to the se↓✔₽rver.
當指針設備用(yòng)于在圖像上(shàng★≈α)點擊,表單提交和(hé)點擊坐(zuò)标傳遞給服務器(qì)。
The x value is measured in pixels from¶↓ the left of the ima←₹ge, and the y value in pixels from t€γhe top of the image.
在x值的(de)單位是(shì)像素從(cóng)α→✘≈左邊的(de)形象,以像素為(wèi)單位從(cóng)圖像的(☆→≤de)頂部y值。
The submitted data includes name.x=x-v←β×alue and name.y=y-value where &ldquo✔ α≈;name” is the value of the name >∏attribute, and x-value and y-val€™±ue are the x and y coordinate valueγs, respectively.
提交的(de)數(shù)據包括name.x ≠©= x值和(hé)name.y = y值在“名稱→↔”的(de)名稱屬性值和(hé)x值和↔₹✘≠(hé)y值是(shì)x和(hé)y坐(zuò)标值。
于是(shì)這(zhè)還(hái)是(s hì)W3C的(de)标準,現(xiàn)在的(de)問(wèn)題÷>φ•就(jiù)是(shì)如(rú)何避免浏覽器(qì≈)“多(duō)此一(yī)舉&rd♦¶↓quo;了(le),很(hěn)簡單,在表單添加onsubmit=₹§¶¥”this.submit(); retδ←♣urn false;”,即修改zencarΩ¶€t的(de)訂單确認頁面模闆tpl_checkout_confirm≤∑πγation_default.php文(w☆ ♣én)件(jiàn)中的(de)
echo zen_draw_form(&lsq∏↔uo;checkout_confirmationσ’, $form_action_url, ‘©Ω±₩post’, ‘id=”chec✘π♠kout_confirmation”&r¶≈dquo;submitonce();”&ls←φ☆quo;);
修改為(wèi)
echo zen_draw_form(&lsqu₩♠ ↔o;checkout_confirmat¶§ion’, $form_ac←π✔↔tion_url, ‘post&&←δrsquo;, ‘id=&rdq→ uo;checkout_confirma§ →tion””this.submi←♦↕™t();return false;”&lsqu¶"±o;);
