使AMP網頁我在asp.net網站,我在http://mywebsite.com/amp/......
屬性「動作」可能不會出現在標籤「的形式[方法= POST]」,而在asp.net
除了以下錯誤,我能夠對AMP進行所有必要的更改。
屬性 '動作' 可能不會出現在標籤 '的形式[方法= POST]'
在我的網站上的表格標記看起來像這樣
<form name="form1" method="post" id="form1">
AMP教程建議使用action-xhr=/default.aspx
代替action="default.aspx
這裏的信息是:https://ampbyexample.com/components/amp-form/
現在,問題是如何刪除動作屬性並在asp.net中添加action-xhr
屬性。
我在cs文件中試過下面的代碼,但沒有運氣。
this.Page.Form.Attributes.Remove("action");
請注意JavaScript
和jQuery
在AMP