【发布时间】:2019-09-27 16:36:46
【问题描述】:
我想知道当我点击 ORACLE APEX 中的按钮时,如何使用 javascript 调用 POST Web 服务方法。
感谢您的帮助
【问题讨论】:
标签: web-services post oracle-apex
我想知道当我点击 ORACLE APEX 中的按钮时,如何使用 javascript 调用 POST Web 服务方法。
感谢您的帮助
【问题讨论】:
标签: web-services post oracle-apex
var url = "your_url";
xhr = new XMLHttpRequest();
xhr.open("POST", url, true);
xhr.setRequestHeader("Content-type", "application/json");
xhr.onreadystatechange = function ()
{
if (xhr.readyState == 4 && xhr.status == 200) {
//do whatever you want to do
} else {
//do whatever you want to do
}
}
xhr.send(JSON.stringify({
"key_1": "value_1",
"key_2": "value_2"
}));
希望这会对你有所帮助。
【讨论】: