希罗, 我有这样的表格
@Test
public void testdeleteAltSite() throws ClientProtocolException, IOException {
String resultCode = "001";
String resultText = "Success";
String url = "http://localhost:8080/adminrest1/alternatesite";
HttpClient client = HttpClientBuilder.create().build();
HttpDelete delete = new HttpDelete(url);
// add header
delete.addHeader("Transaction-Id", "11");
delete.addHeader("content-type", "application/json");
LOG.info(url);
HttpResponse response = client.execute(delete);
byte[] buf = new byte[512];
InputStream is = response.getEntity().getContent();
int count = 0;
StringBuilder builder = new StringBuilder(1024);
while ((count = is.read(buf, 0, 512)) > 0) {
builder.append(new String(buf, 0, count));
}
String output = builder.toString();
System.out.println(output);
}`
现在,我想在提交按钮上显示新页面,其中包含来自此表单的表格中的收集数据。 我可以通过php和jquery或新的自定义组件来做到这一点吗? 感谢名单
答案 0 :(得分:0)
PHP:
需要表单中的提交按钮
需要action =“”和method =“post”属性添加到您的表单标记
需要在输入框中添加名称属性
返回页首,
if(isset($_POST['submit'])){
$variable = $_POST['namedOfInputBox'];
echo "<table><tr><td>$variable</td></tr></table>";
{
说的是如果提交表单(提交是提交按钮的名称,通常是提交的名称),通过的值是这些,在PHP中我们“回显”或打印出html代码并放置我们的变量在这里。您可以使用:
echo "<table><tr><td>$variable</td></tr></table>";
或
echo "<table><tr><td>" . $variable . "</td></tr></table>";