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

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...

主站蜘蛛池模板: 东海县| 资源县| 甘孜| 孝昌县| 普兰县| 仁怀市| 长宁县| 开远市| 三门峡市| 梧州市| 依安县| 社会| 茂名市| 姚安县| 大城县| 峨山| 峡江县| 宝鸡市| 斗六市| 阜南县| 吉安市| 南漳县| 城口县| 湖北省| 芦溪县| 泉州市| 山西省| 菏泽市| 上蔡县| 正定县| 五华县| 娄烦县| 岑巩县| 高平市| 华亭县| 虎林市| 陕西省| 大庆市| 进贤县| 岳池县| 四川省|