如何重定向到用户在select标记中选择的页面 挑选 信用卡 借记卡 网上银行

如何重定向到用户在select标记中选择的页面 挑选 信用卡 借记卡 网上银行,select,button,Select,Button,在上面的代码中,如果用户选择像信用卡这样的选项,则页面应重定向到信用卡页面,该表单中的其他字段应发布到nxt页面,如姓名电子邮件等,这应在点击按钮后确认预订,脚本代码:您的HTML页面: <select name="cmbpgCategory" id="cmbpgCategory"> <option value="" label="Select" selected="selected">Select</option> <option value="Cre

在上面的代码中,如果用户选择像信用卡这样的选项,则页面应重定向到信用卡页面,该表单中的其他字段应发布到nxt页面,如姓名电子邮件等,这应在点击按钮后确认预订,脚本代码:

您的HTML页面:

<select name="cmbpgCategory" id="cmbpgCategory">
<option value="" label="Select" selected="selected">Select</option>
<option value="CreditCards" label="Credit Cards">Credit Cards</option>
<option value="DebitCards" label="Debit Cards">Debit Cards</option>
<option value="NetBanking" label="Net Banking">Net Banking</option>
</select>

挑选
信用卡
借记卡
网上银行
$(文档).ready(函数(){
$('#cmbpgcontegory').bind('change',function(){
var cardType=$('#cmbpgcontegory').val();//您将在此处获得CreditCard、debitcards值
开关(卡式)
{
案例“CreditCards”:window.location.href='creditcard.php';
//还有更多的案例要跟进吗?请暂停
}   
});
});

onchange
事件中调用
submit()
。如果我想更改不同的链接,比如每次都有3个选项,我无法调用更改函数。如果我使用if函数,比如if(value==creditcard){window.location.href=“creitcard.php”}else,会有帮助吗-----
<html>
<body>
<select name="cmbpgCategory" id="cmbpgCategory">
<option value="" label="Select" selected="selected">Select</option>
<option value="CreditCards" label="Credit Cards">Credit Cards</option>
<option value="DebitCards" label="Debit Cards">Debit Cards</option>
<option value="NetBanking" label="Net Banking">Net Banking</option>
</select>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
</script>
<script>
$(document).ready(function() {
    $('#cmbpgCategory').bind('change', function () {
        var cardType = $('#cmbpgCategory').val();//you will get CreditCard, debitcards values here
        switch(cardType)
        {
            case 'CreditCards': window.location.href = 'creditcard.php';
            //more cases to follow?, put break
        }   
    });
});
</script>
</body>
</html>