understanding javascript execution context, what the hell the variable is?
If you are a C programmer, you must know you can not declare a variable using the same name as the function formal parameter in the same scope: void foo(int […]
If you are a C programmer, you must know you can not declare a variable using the same name as the function formal parameter in the same scope: void foo(int […]
I’ve learned enough about ajax, from javascript ajax to jquery ajax, from client side to server side, from asp to php, from form submit to various data types encoding and […]
We’ve learned how to add markers on map. In that example, the marker is added when the map is loaded, and its location is predetermined. How to add a marker […]
We’ve learned how to add markers on map using baidu map api. An often encountered use case is when user clicks on a marker, an information window pops up showing […]
An important feature of a map application is the ability of adding/displaying markers on a map. Markers, together with other elements such as labels, poly-lines,polygons, circles, etc. are called overlays […]
In previous tutorial of baidu map api, we’ve learned how to use baidu map api to display a map on web page. That is exiting, but the displayed map seems […]
Here is the official guide of baidu map api to display a map, but it does not work if you copy paste it into your web page. <!DOCTYPE html> <html> […]
I will definitely forget the syntax of jQuery selectors if I do not write jQuery code for some days. So it is better to list them here as a memo. […]
To get the text value of element, you can: use .text() <!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <script src=”jquery.min.js”></script> </head> <body> <div>aa<b>bb</b></div> <div>cc</div> <script> alert($(“div”).text()); </script> </body> </html> This […]
Every object in javascript has a __proto__ property. The value of __proto__ is the prototype property of its construction function, or null if the object is not constructed by a […]