javascript - Retrieving element with no name or id -


i trying write code accomplish simple. have never worked paypal button before, causing difficulty.

i have been able simulate button click before, using document.getelementbyid or document.getelementsbyname(), however, form trying submit above not have name, or id, not know how refer in code.

i trying write short chrome extension using javascript find paypal form/button on page (that not own or have control over), , submit without me having click it. guidance/links appreciated.

looks button has name, can use .getelementsbyname()

var btn = document.getelementsbyname('submit')[0] 

if have access jquery or can add jquery project then

var btn = jquery('input[name="submit"]') 

Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

php - HTTP_REFERER woes: How can I allow access to a specific page, only when a visitor has visited another specific page beforehand? -