作者: carlkyo 時間: 2017-12-16 08:49 標題: Jquery 請教
本帖最後由 carlkyo 於 2017-12-16 08:51 編輯
https://atandrastoth.co.uk/main/ ... /simple_jquery.html
- <script type="text/javascript">
- var arg = {
- resultFunction: function(result) {
- $('body').append($('<li>' + result.format + ': ' + result.code + '</li>'));
- }
- };
- $("canvas").WebCodeCamJQuery(arg).data().plugin_WebCodeCamJQuery.play();
- </script>
我想改左ajax post result.code要點改啊
many thanks
我自己改唔到
作者: gamezz 時間: 2017-12-16 23:09
咁result.code你想改成咩?
via HKEPC Reader for Android
作者: carlkyo 時間: 2017-12-18 09:49
我想ajax post 個result.code 去php return result
many thanks gamezz
作者: gamezz 時間: 2017-12-18 21:35
- resultFunction: function(result) {
- $.ajax({url: "a.php", success: function(ajaxResult){
- $('body').append($('<li>' + result.format + ': ' + ajaxResult + '</li>'));
- }});
- }
作者: carlkyo 時間: 2017-12-18 23:55
thanks
- var arg = {
- resultFunction: function(result) {
-
- $.ajax({
- url: '1.php',
- type: 'post',
- data: {format: result.format, code: result.code},
- success: function(data, status) {
- $('body').append($('<li>' + data + '</li>'));
- //if(data == "ok") {
-
- //}
- },
- error: function(xhr, desc, err) {
- console.log(xhr);
- console.log("Details: " + desc + "\nError:" + err);
- }
- }); // end ajax call
-
-
-
- }
- };
- $("canvas").WebCodeCamJQuery(arg).data().plugin_WebCodeCamJQuery.play();

