how to write a html5? [closed]
what i should inorder right a html5 program which will communicate withe client and replies to the server.in which platform it becomes easy either in c# or javascript
HTML5 (now just referred to as HTML) is not a programming language. It is exactly the same as HTML (4) but with a few new tags and a required doctype of <!doctype html>
. That is it. You can use the canvas tag to create some awesome javascript good-ness (which may be what you are looking for) due to some awesome new javascript API's such as websockets, but HTML(5) itself does not do this.
If you're trying to do what I think you're trying to do - which is put together a HTML/Javascript front end which can communicate with a C# backend, I suggest using jQuery ajax or similar to call C# methods:
$.ajax({
type: "POST",
url: "/path/to/your/File.aspx/SomeMethod",
data: "{ yourData: 'data' }",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function() {
// Successful
},
error: function() {
// Unsuccessful
}
});
http://api.jquery.com/jQuery.ajax/
精彩评论