![](/img/trans.png)
[英]jQuery post() apostrophe how is apostrophe automatically converted to html numeric entity?
[英]html post automatically
这是我的代码:
<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=utf-8"%>
<%
// some code
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Temp </title>
</head>
<body>
<form name="EventConfirmRedirection" method="post" action="event-buy-ticket.jsp">
<input type="hidden" value="<%=seance_id%>" id="seanceId" name="seanceId"></input>
<input type="hidden" value="<%=selected_seat_count%>" id="urlField" name="seatCount"></input>
<input type="hidden" value="<%=seat[0]%>" id="seatId1" name="seatId1"></input>
<input type="hidden" value="<%=ticket_cost[0]%>" id="ticketCost1" name="ticketCost1"></input>
<input type="submit" value="Go" >
</form>
</body>
</html>
我可以将值发布到下一页。 当我单击“开始”时,它会发布。 没关系。 问题是我不想使用<input type="submit" value="Go">
或类似在屏幕上可见的东西。 我正在尝试自动执行此操作。 当此页面出现时,则应直接发布“ event-buy-ticket.jsp”。
试图用JavaScript做到这一点,但我不能。 也许HTML有一种简单的方法。
这应该可以解决JavaScript问题
document.EventConfirmRedirection.submit();
<script type="text/javascript">
window.onload = function() {
document.forms["EventConfirmRedirection"].submit();
}
</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.