【发布时间】:2019-06-14 21:48:07
【问题描述】:
如何将“amp-state”提交给我在“action-xhr”上调用的 PHP 网络服务?
更新: 让我具体一点:我有:
<form method="post" action-xhr="some_web_service_url">
<amp-state id="myState">
<script type="application/json">
{
"foo": "bar"
}
</script>
</amp-state>
.....
</form>
现在,如何将 amp-state 中的 foo 设置为我在“发布”请求中对“some_web_service_url”的参数/值之一? 我需要从 amp-state 中选择值,而我不能将其设置为 fixed! 我不能在 url 查询字符串中设置它!
【问题讨论】:
-
通过编程!请拨打tour 并阅读How to ask a good question 以确保我们能够真正为您提供帮助。
标签: php web-services amp-html