简体   繁体   English

使用javascript将数据发送到服务器

[英]sending data to server with javascript

how can i send a string value to a sever with java script without submit method? 没有提交方法,如何使用Java脚本将字符串值发送到服务器? i know i can use jquery or ajax but is there any other way to do that without any library? 我知道我可以使用jquery或ajax,但是有没有其他方法可以做到这一点? i searched in Google and i find some good links: How to send data to remote server using Javascript http://bytes.com/topic/html-css/answers/154271-post-data-server-javascript-client-side 我在Google中进行了搜索,发现了一些很好的链接: 如何使用Javascript将数据发送到远程服务器 http://bytes.com/topic/html-css/answers/154271-post-data-server-javascript-client-side

but all of them said we should use jquery or ajax 但所有人都说我们应该使用jquery或ajax

Yes, that what you have to do if you don't want to refresh the page. 是的,如果您不想刷新页面,则必须执行此操作。 Although, you could find other framework rather than jQuery. 虽然,您可以找到其他框架而不是jQuery。 That framework still use ajax technology inside. 该框架内部仍使用ajax技术。

AJAX isn't a library - it's built into Javascript, and is available on pretty much all browsers from even IE6 onwards. AJAX不是库-它内置在Javascript中,并且从IE6开始,几乎所有浏览器都可以使用AJAX。

You can find full tutorials and instruction here: http://www.w3schools.com/ajax/default.asp 您可以在此处找到完整的教程和说明: http : //www.w3schools.com/ajax/default.asp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM