人们将能够在浏览的状态栏中看到 javascript 确认链接。那么,下面的代码是否足够安全以及如何隐藏 javascript 以不显示这一点:
javascript:a = confirm('Are you sure you want to purchase this reward?'); if (a) { location.href='./?page=vote&act=rewards&id=8'} else void(0)
Script:
if ($_SESSION['nVotePoints'] >= $data['nCost']) {
$url = './?page=vote&act=rewards&id=' . $data['id'];
$confirm = "javascript:a = confirm('Are you sure you want to use purchase this reward?'); if (a) { location.href='{$url}'} else void(0)";
$data['URL'] = $confirm;
}
else
$data['URL'] = 'javascript: alert(\'' . stripslashes(Template::GetLangVar('VOTE_NEED_VP')) . '\');';
$column[$i++] = Template::Load('vote-reward-column', $data);
亲切的问候。