jQuery下拉列表无法使用任何浏览器 $(文档).ready(函数(){ $(“信用卡支付”).hide(); $(“#首付方法”)。更改(函数(){ if($(“#首付方法”).val()==‘信用卡’){ 美元(“#信用卡支付”)。显示(“快速”); }否则{ 美元(“#信用卡支付”)。隐藏(“快速”); }; if($(“#首付方法”).val()=='e#u check'){ 美元(“#e#u pay”)。显示(“快速”); }否则{ 美元(“#e#u pay”)。隐藏(“快速”); }; }); }); 首期付款方式 信用卡 电子支票

jQuery下拉列表无法使用任何浏览器 $(文档).ready(函数(){ $(“信用卡支付”).hide(); $(“#首付方法”)。更改(函数(){ if($(“#首付方法”).val()==‘信用卡’){ 美元(“#信用卡支付”)。显示(“快速”); }否则{ 美元(“#信用卡支付”)。隐藏(“快速”); }; if($(“#首付方法”).val()=='e#u check'){ 美元(“#e#u pay”)。显示(“快速”); }否则{ 美元(“#e#u pay”)。隐藏(“快速”); }; }); }); 首期付款方式 信用卡 电子支票,jquery,Jquery,我写的上述代码非常适用于: 但它在我的服务器上不工作。 在firefug中,它以红色显示以下内容: $ DP_jQuery_1328833882393 jQuery 我无法理解上面的意思。 我已包括以下文件: <script type="text/javascript"> $(document).ready(function() { $("#credit_pay").hide(); $("#downpayment_method").change(function() {

我写的上述代码非常适用于: 但它在我的服务器上不工作。 在firefug中,它以红色显示以下内容:

$

DP_jQuery_1328833882393

jQuery

我无法理解上面的意思。 我已包括以下文件:

<script type="text/javascript">
$(document).ready(function() {  
  $("#credit_pay").hide();
  $("#downpayment_method").change(function() {
      if ($("#downpayment_method").val()=='credit_card') {
       $("#credit_pay").show("fast");
      } else { 
       $("#credit_pay").hide("fast");
    };
      if ($("#downpayment_method").val()=='e_check') {
       $("#e_pay").show("fast");
      } else { 
       $("#e_pay").hide("fast");
    };
  });
});
</script>

<tr>
    <td>
        <label for="downpayment_method">Downpayment Method</label>
        <select id="downpayment_method" name="downpayment_method" >
            <option value="" selected="selected"></option>
            <option value="credit_card">Credit Card</option>
            <option value="e_check">E-check</option>
        </select>
    </td>
</tr>

我有什么遗漏吗

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>

<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js" type="text/javascript"></script>

卡片上的名字
计费拉链
卡片类型
签证
万事达卡
发现
美国运股票交易所
赊帐
路由#
帐目#
这里是一个实时链接


正如克雷格所说,是
标签造成了问题 我删除了表格,只使用了css。
这是最新的链接。

小提琴对我来说很好用,你能更清楚地解释一下你看到的是什么吗?什么意思在浏览器中不起作用?你的页面中一定有其他代码?也许你无法连接到网络中的cdn?在IE8和Chrome中为我工作?你说“在我的任何浏览器上都不工作”是什么意思?您不是在一个浏览器中测试JSFIDLE吗?你的意思是说它部署在web服务器上时不工作?我可以看到一些改进代码的方法,但我看不到任何东西会阻止它工作。在示例中,您的tr标记包含在div标记中,而不是表标记中,但我认为您必须详细说明您的问题。我在示例页面中测试了标记、脚本和jquery include,它对我有效。我的猜测是,页面中有更多的问题,而不是你在这里发布的内容。快速搜索
DP\u jQuery
将调出与日期选择器相关的项目。在服务器上存在的页面中是否有日期选择器?您是否能够提供指向您的直播内容的链接供人们评估?请仅对实际答案使用“发布答案”按钮。你应该修改你原来的问题来添加更多的信息。我相信这篇文章会对像我这样的初学者索莫扎很有帮助。不要像我上面做的那样在表标记之间包含标记。您的jquery不太可能工作。
<div id="credit_pay">
    <tr>
        <td>
            <label for="name_on_card">Name on Card</label>
            <input type="text" name="name_on_card">
            <label for="billing_zip">Billing Zip</label>
            <input type="text" name="billing_zip">
        </td>
    </tr>
    <tr>
        <td>
            <label for="card_type">Card Type</label>
            <select id="card_type" name="card_type">
                <option value="" selected="selected"></option>
                <option value="Visa">Visa</option>
                <option value="Mastercard">Mastercard</option>
                <option value="Discover">Discover</option>
                <option value="Amex">Amex</option>
            </select>
        </td>
    </tr>           
</div>
<div id="e_pay">
    <tr>
        <td>
            <label for="name_on_account">Name on Account</label>
            <input type="text" name="name_on_account">
        </td>
    </tr>
    <tr>
        <td>
            <label for="routing_no">Routing #</label>
            <input type="text" name="routing_no">
        </td>
    </tr>
    <tr>
        <td>
            <label for="account_no">Account #</label>
            <input type="text" name="account_no">
        </td>
    </tr>

</div>