0

在此代码中,内部函数 callbackCurrency 不允许修改 span id 的更改。这是来自其他函数的回调函数。它在 console.log 中给出错误“No_MODIFICATION_ALLOWED”

loadAccForConVoucher = function() {
    document.getElementById('conFromAccount').innerHTML = "";
    document.getElementById('conToAccount').innerHTML = "";
    $.mobile.eazydb.transaction(function(tx) {
        tx.executeSql('SELECT Account_Name FROM Account WHERE Account_Parent_ID IN("bank", "cash")', [],
            function(tx, rs){
                if(rs.rows.length == 0) {
                    alert('There is no account. please create accounts in bank or cash group to use this feature.');
                } else {
                    $.mobile.changePage( $("#contraVoucher"), { transition: "none"} );
                    for(var i = 0;i < rs.rows.length; i++) {
                        $("#conFromAccount").append('<option value="'+rs.rows.item(i).Account_Name+'">'+rs.rows.item(i).Account_Name+'</option>');
                        $("#conFromAccount").selectmenu("refresh");
                        $("#conToAccount").append('<option value="'+rs.rows.item(i).Account_Name+'">'+rs.rows.item(i).Account_Name+'</option>');
                        $("#conToAccount").selectmenu("refresh");
                    }

                    var callbackCurrency = function(response){ 
                        alert('response is : '+response);
                        document.getElementById('currency').innerHTML = response;
                    }
                    getCurrency(callbackCurrency);
                }
          });
      });
}
4

0 回答 0