简体   繁体   中英

Inline style element appers in develoer window but not when viewing source code

I am looking at a form that has a captcha . The CSS being applied has made it all whacky looking. I'm about to diagnose the issue, and I'm looking at the styles being applied in my Google chrome developer window. For each individual rule, there is light grey text in the top right of the box that says where the code came from. The one rule I'm interested in indicates it came from <style></style> , which I assume is an inline style rule. Clicking on the source, it takes me to the <style> element that is defined and sure enough the rules are there. These rules don't exist in the source file, so I'm pretty sure the element is appended through javascript. When I hit ctrl + u to view the source code, the <style> element is not there.

How can I see an element that exists in the developer window without it existing in the view source code?

由JavaScript创建的元素在源代码中不可见,这是因为它们是动态创建的,并且当您使用“查看页面源代码”时,将获得服务器返回的页面的源代码,而无需执行JavaScript。

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