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

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

主站蜘蛛池模板: 温宿县| 广汉市| 南雄市| 天津市| 阿鲁科尔沁旗| 桐城市| 萍乡市| 文昌市| 永川市| 确山县| 秦皇岛市| 宜君县| 阳高县| 浠水县| 喀喇| 潢川县| 阿巴嘎旗| 南安市| 会同县| 绿春县| 文成县| 兴国县| 抚松县| 大兴区| 磐安县| 富锦市| 都昌县| 香港| 富顺县| 镇宁| 灵寿县| 平安县| 陈巴尔虎旗| 民勤县| 怀宁县| 马山县| 轮台县| 蕲春县| 新野县| 安乡县| 黔南|