例如下面的代码,我必须点击提交按钮才能转到目标帖子页面,但是我想转到目标页面而不点击提交按钮,我想点击目标页面在我的电报机器人按钮上运行我的代码页。
<html>
<body>
<form action="?????????" method="post" target="_blank">
type: <input type="text" name="type" value="111" ><br>
amount: <input type="text" name="amount"value="1000"><br>
cellphone: <input type="text" name="cellphone"value="2222"><br>
email: <input type="text" name="email"value="111@gmail.com"><br>
webserviceId: <input type="text" name="webserviceId"value="34433"><br>
redirectUrl: <input type="text" name="redirectUrl"value="w2323.php"><br>
issuer: <input type="text" name="issuer"value="ssdsd"><br>
redirectToPage: <input type="text" name="redirectToPage"value="True"><br>
scriptVersion: <input type="text" name="scriptVersion"value="Script"><br>
firstOutputType: <input type="text" name="firstOutputType"value="get"><br>
secondOutputType: <input type="text" name="secondOutputType"value="get"><br>
<input type="submit" value="submit">
</form>
</body>
</html>
答案 0 :(得分:3)
向表单添加id,然后在按钮上绑定一个函数。虽然你的问题有点不清楚你想要什么
CREATE OR REPLACE FUNCTION someF(a integer, b integer, c integer) RETURNS someType AS $$
DECLARE
problematicVariable float := $1 / $2;
idVar someType;
BEGIN
SELECT id INTO idVar
FROM yetAnotherTable st
WHERE st.agg <= problematicVariable;
FOR i IN 1 .. $3 LOOP
CREATE TABLE IF NOT EXISTS someTable AS
SELECT someFunction(idVar);
END LOOP;
END;
$$ LANGUAGE plpgsql;
JS
<form id='someid'>
type: <input type="text" name="type" value="111" ><br>
amount: <input type="text" name="amount" value="1000"><br>
cellphone: <input type="text" name="cellphone" value="2222"><br>
email: <input type="text" name="email" value="111@gmail.com"><br>
webserviceId: <input type="text" name="webserviceId" value="34433"><br>
redirectUrl: <input type="text" name="redirectUrl" value="w2323.php"><br>
issuer: <input type="text" name="issuer" value="ssdsd"><br>
redirectToPage: <input type="text" name="redirectToPage" value="True"><br>
scriptVersion: <input type="text" name="scriptVersion" value="Script"><br>
firstOutputType: <input type="text" name="firstOutputType" value="get"><br>
secondOutputType: <input type="text" name="secondOutputType" value="get"><br>
<button onclick="myFunc()">
</form>