Home >Web Front-end >JS Tutorial >Some notes on jQuery_jquery
When using jQuery, I always thought that what I retrieved using $("#someid") was an extension of the DOM object, so I felt comfortable using $("#someid").value,$("#someid"). text and the like, but unfortunately I have never been able to get the desired value. It was later discovered that it was not an extension. If you want to get a value similar to the above, you need to use $("#someid").val(), $("#someid").text(). I only discovered these after checking its api documentation. I can’t help but sigh, how important JavaScripty’s api documentation is.
These two methods: $("#formId").submit(), $("#formId").submit(function(){ ...}), the difference between the two is that the former is called submit method, the latter is to add the onsubmit method.
Using jQuery to call ajax is very convenient, $.get, $.post, you will find out after reading these two methods. It is very convenient to use fp in javascript. If it is Java, it will only use anonymous class methods at present. The code is not concise, and there is no flavor of fp at all.
Use thickbox (go to http://jquery.com/plugins, find the homepage of thickbox, look at the example and you will be able to use it), you should pay attention when writing pop-up windows, if you use #td_inline, for example Write like this