<script>
function test() {
var name=prompt ("Some question / text")
if (name.toLowerCase()=="TextToBlock") {
alert ("text");
name.preventDefault();
}
else {
}
}
</script>
<body>
< a id="link" onclick="test()" href="http://www.example.com">Text</a>
</body>
誰かがプロンプト ボックスに「TextToBlock」と入力すると、ユーザーがリンクの場所に移動できないようにしたいと思います。
ありがとう。