简体   繁体   English

正在调用javascript / jquery函数的逆向工程

[英]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). 站点上有一个Web表单,它在标记为Email(名为Question2)的字段上进行一些客户端验证。 This is the page: http://www.home-energy-analytics.co.uk/concrete5.6.1/index.php?cID=132 . 这是页面: 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. 如果向电子邮件字段添加“1”,然后将焦点更改为其他元素,则会看到边框变为红色。 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". 如果您尝试提交表单,客户端会阻止它,并显示看起来像绝对定位的div,文本为“请输入电子邮件地址”。 It doesn't seem possible to inspect this element using firefox or firebug. 使用firefox或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. 看起来可能有一个脚本由客户端使用ccm-base脚本中的ccm_addHeaderItem函数动态创建,但我无法看到该函数是如何被调用的,以便计算出任何动态创建的脚本的URL。

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. 请注意,由于这是一个具体的网站,我已经在concrete5论坛上询问但没有成功。

This is a HTML5 feature. 这是一个HTML5功能。 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" 查看此处的示例http://www.w3schools.com/html/tryit.asp?filename=tryhtml5_input_type_email对于类型为“email”的输入字段,可以在任何位置看到此行为

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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