attributes - jQuery grab html -


We have a link on some page (with the html code on the same code), that page Is a img , which are similar to the attributes title and alt .

Scripts link (no one on the page is visible), hold the img of the src attribute, which title = alt , and throw the value in some variable

Is it possible?

Thank you.

you can do this, and, like this:

  $ Get ('/ works', function) {var Src = $ ('img', data). Filters (function () {this.title == this.alt;}) .attr ('src'); dosomethingWithIt (Src);});  

This is an incomprehensible operation, so that when the response is returned and the code will return, it will not be available in the line of code after the execution of the function and src . You need to continue the work that is necessary for the information within that function, so when the data comes back and is ready then this work continues.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -