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

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

主站蜘蛛池模板: 凤庆县| 开原市| 郓城县| 威宁| 邯郸县| 正宁县| 保康县| 进贤县| 阿荣旗| 正安县| 梁山县| 德惠市| 纳雍县| 门源| 兴安县| 黄山市| 重庆市| 东乡县| 曲水县| 芷江| 新余市| 修武县| 普安县| 湾仔区| 永泰县| 天长市| 东至县| 邵武市| 兰考县| 济源市| 阿坝县| 松潘县| 蕉岭县| 丰都县| 香格里拉县| 二手房| 南乐县| 象山县| 阜南县| 襄垣县| 伊通|