我有这个功能:
<SCRIPT language="JavaScript">
<!--
function go_there()
{
var where_to= confirm("Do you really want to go to this page??");
if (where_to== true)
{
window.location="https://www.sandbox.paypal.com/xxxx";
}
else
{
window.location="#";
}
}
//-->
</SCRIPT>
这个按钮:
<a href="javascript:void(0)" class="signup_button3" onClick="go_there()"><span class="floatbutton">Get It! $10</span></a>
我知道这是一个简单的事情,涉及正确设置参数,但我仍然很新,并试图弄明白......
我将在同一页面上有几个按钮,当用户点击按钮时,我希望发生相同的弹出窗口,但是他们将被带到每个按钮的不同paypal结帐。你能告诉我怎么做吗?
最后,弹出按钮可以处理无序列表吗?
谢谢! 乔尔
编辑:弄清楚我的第一个问题和编辑过的问题...抱歉混淆了!
答案 0 :(得分:1)
<input type="button" onclick="go_there('http://...')" value="press me">
<script type="text/javascript">
function go_there(loc)
{
var where_to= confirm("Do you really want to go to this page??");
if (where_to)
{
document.location=loc;
}
}
</script>
我不清楚你对有序列表的看法。弹出窗口是HTML页面,与其他任何页面一样。