开发者

Browser download dialog box

开发者 https://www.devze.com 2023-01-22 00:33 出处:网络
I want to open up browser dialog box when user click a button, and afaik this can be done by using a FORM tag.开发者_如何学运维

I want to open up browser dialog box when user click a button, and afaik this can be done by using a FORM tag.

开发者_如何学运维

The problem is the server only accepts json data (and using the form tag it has to have a name i.e.

formdata={"key":"value"}   

The server does not like this format as it expects pure JSON

{"key":"value"}

Is there a way to send JSON data using FORM tag ?


Looks like you will have to build your json object by hand onClick (read out your forms input fields and place them in an object according to the json specification).

0

精彩评论

暂无评论...
验证码 换一张
取 消