I have some data that I need to convert to JSON format and then POST it with a JavaScript function.(我有一些数据需要转换为JSON格式,然后使用JavaScript函数发布。)
<body onload="javascript:document.myform.submit()">
<form action="https://www.test.net/Services/RegistrationService.svc/InviteNewContact" method="post" name="myform">
<input name="firstName" value="harry" />
<input name="lastName" value="tester" />
<input name="toEmail" value="testtest@test.com" />
</form>
</body>
This is the way the post looks now.(这就是帖子现在的样子。)
I need it submit the values in JSON format and do the POST with JavaScript.(我需要它以JSON格式提交值,并使用JavaScript进行POST。) ask by translate from so