官术网_书友最值得收藏!

Solution #1 - hope for the best!

How can we solve the problem? The first solution may seem like a joke: do nothing, tell the user not to click twice, and hope for the best! Your page might look as Figure 2.1.

Figure 2.1. An actual screenshot of a page, just warning you against clicking more than once

This is a weasel way of avoiding the problem, but I've seen several websites that just warn the user about the risks of clicking more than once (see Figure 2.1) and actually do nothing to prevent the situation... the user got billed twice? we warned them... it's their fault! Your solution might simply look as the following code.

<button id="billButton" onclick="billTheUser(some, sales, data)">Bill me</button>
<b>WARNING: PRESS ONLY ONCE, DO NOT PRESS AGAIN!!</b>

OK, so this isn't actually a solution; let's move on to more serious proposals...

主站蜘蛛池模板: 仁寿县| 峨眉山市| 西乡县| 汕尾市| 龙岩市| 襄汾县| 曲周县| 贵南县| 类乌齐县| 太保市| 麟游县| 灵寿县| 平邑县| 瑞昌市| 襄城县| 堆龙德庆县| 临清市| 上林县| 鄂托克前旗| 德昌县| 江北区| 府谷县| 长乐市| 澎湖县| 衡阳县| 张家港市| 六枝特区| 化德县| 尖扎县| 晋宁县| 曲沃县| 夹江县| 壶关县| 兴城市| 河西区| 晋江市| 霍山县| 民丰县| 太仆寺旗| 曲水县| 文安县|