通过Javascript调用PHP页面

我必须使用一个Java脚本命令调用一个PHP页面.
我开发了一个几乎完全符合我需要的函数:
查看代码:示例1
但在最后一部分中,它使我"查看"(Docent.getElementByID('showResult'))唯一的结果,我需要这样做,它将调用另一个PHP页面,在那里它将执行在该页面中传递的指令.
使用的代码:

选择 | 换行 | 行号
  1. //Example 1
  2.  
  3. function getCheckedValues() 
  4.             {
  5.                 return Array.from(document.querySelectorAll('input[type="checkbox"]'))
  6.                         .filter((checkbox) => checkbox.checked)
  7.                         .map((checkbox) => checkbox.value);
  8.                 }
  9.  
  10.                 const resultEl = document.getElementById('result');
  11.  
  12.                         document.getElementById('showResult').addEventListener('click', () =>{
  13.                         resultEl.innerHTML = getCheckedValues();
  14.  
  15. });
  16.  
选择 | 换行 | 行号
  1. //Link that should I call through the function:
  2.  
  3. <p>
  4. https://localhost.test:8085/live/backofficeNew/Tests/controller/sendToPhysicianSampleID.php?idList=BIY53423 </p>
  5.  
# 回答1


您可能想要使用
回流接口
.
你的指示指的是什么?URL参数?

标签: Javascript

添加新评论