简体   繁体   中英

Reverse engineering which javascript/ jquery function is being called

I need assistance determining what is doing client side validation on a site.

There is a web form on a site, and it does some client side validation on a field labelled Email (named Question2). This is the page: http://www.home-energy-analytics.co.uk/concrete5.6.1/index.php?cID=132 .

If you add a "1" to the email field and then change the focus to another element, you'll see the border turn red. If you try to submit the form, the client prevents it, and shows what looks like an absolutely positioned div with the text, "Please enter an email address". It doesn't seem possible to inspect this element using firefox or firebug. I have checked all the inline scripts and those in separate files, but cannot see what is doing these validations.

It looks like there may be a script which is created dynamically by the client using the ccm_addHeaderItem function in the ccm-base script, but I cannot see how that function is being called, in order to work out the URL of any dynamically created script.

Are you able to find the function(s) doing these validations?

Note, as this is a concrete5 site, I have asked on the concrete5 forums without success.

This is a HTML5 feature. It will be implemented by browser default behavior. Check the example here http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_type_email This behaviour can be seen anywhere for a input field with type "email"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM