Using the Google Web Toolkit or Javascript how do I go about parsing HTML to find an image element and its link? -


i prefer answer in gwt should able translate javascript purposes. appreciated!

if element has id, can use:

element e = com.google.gwt.user.client.dom.getelementbyid("myimgelementid"); string imagesrc = e.getpropertystring("src"); 

if you're fan of strong typing, like:

element e = dom.getelementbyid("myimgelementid"); imageelement img = imageelement.as(e); string imagesrc = img.getsrc("src"); 


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -