亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

php 中新行的 jQuery 語法是什么?

php 中新行的 jQuery 語法是什么?

動漫人物 2023-05-19 14:28:37
當 php 中的 jq 代碼時,我試圖在 jQuery 中找到運算符以在下一行編寫代碼這是我的工作代碼:-        <?php    $addoldgoldrow = '                                        $(document).on("click",".add_btns",function(e) {                                                     e.preventDefault();                                        $("table#old_gold tbody").append(markups);                                        indexassigneroldpurchase();                                     });                       ';    $this->registerJs($addoldgoldrow, View::POS_READY);    ?>我正在嘗試這樣做     <?php    $addoldgoldrow = '                                        $(document).on("click",".add_btns",function(e) {                                                     e.preventDefault();                                        var markups = "<tr class=\'rowaccs\'>                                                        <td><input type=\'text\' class=\'sl_no\' name=\'sl_no[]\' style=\'width: 100%\'></td>                                                        <td><input type=\'text\' class=\'oweight inputbox input_table1\' name=\'oweight[]\' style=\'width: 100%\'></td>                                                        <td><input type=\'text\' class=\'ostone_weight  inputbox input_table1\' name=\'ostone_weight[]\' style=\'width: 100%\'></td>                                                        <td><input type=\'text\' class=\'ovd inputbox input_table1\' name=\'ovd[]\' style=\'width: 100%\'></td>                                                        <td><input type=\'text\' class=\'onet_weight inputbox input_table1\' name=\'onet_weight[]\'  style=\'width: 100%\'></td>                                                        <td><input type=\'text\' class=\'orate inputbox input_table1\' name=\'orate[]\' value=\'' . $metal_rate . '\' style=\'width: + 運算符不起作用我試過“+”和“+”什么運算符最適合用來連接這些線?
查看完整描述

1 回答

?
慕森卡

TA貢獻1806條經驗 獲得超8個贊

只需\在每一行的末尾添加


所以你的代碼看起來像這樣:


$addoldgoldrow = '    

  $(document).on("click",".add_btns",function(e) {             

    e.preventDefault();

    var markups = "<tr class=\'rowaccs\'> \

                    <td><input type=\'text\' class=\'sl_no\' name=\'sl_no[]\' style=\'width: 100%\'></td> \

                    <td><input type=\'text\' class=\'oweight inputbox input_table1\' name=\'oweight[]\' style=\'width: 100%\'></td> \

                    <td><input type=\'text\' class=\'ostone_weight  inputbox input_table1\' name=\'ostone_weight[]\' style=\'width: 100%\'></td> \

                    <td><input type=\'text\' class=\'ovd inputbox input_table1\' name=\'ovd[]\' style=\'width: 100%\'></td> \

                    <td><input type=\'text\' class=\'onet_weight inputbox input_table1\' name=\'onet_weight[]\'  style=\'width: 100%\'></td> \

                    <td><input type=\'text\' class=\'orate inputbox input_table1\' name=\'orate[]\' value=\'' . $metal_rate . '\' style=\'width: 100%\'></td> \

                    <td><input type=\'text\' class=\'oamount inputbox input_table1 table1_end row_end\' name=\'oamount[]\'  style=\'width: 100%\' readonly></td> \

                    td><span class=\'rowcloseoldgold\'><i class=\'fa fa-times\' style=\'color: #C11429;\' aria-hidden=\'true\'></i></span></td</tr>";

    $("table#old_gold tbody").append(markups);

    indexassigneroldpurchase();

});  ';     


查看完整回答
反對 回復 2023-05-19
  • 1 回答
  • 0 關注
  • 118 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號