I wrote this script to extract the form number from DOM. It works in other js debuggers, but I don't know what I'm doing wrong with Zenno.
How can I feed javascript the Page.Dom correctly?
Код:
var pageSource = '{-Page.Dom-}';
var re = /<form[^>]*>/gim;
var match= {};
var counter = 0;
var formNumber = 0;
while (match = re.exec(pageSource)) {
if (match[0].indexOf('id="register"') !=-1) {
formNumber = counter;
}
counter++;
}
alert(formNumber);