简体   繁体   English

使用JQuery的Dev Tools Chrome可以启用/禁用内容

[英]Dev Tools Chrome with JQuery you can enable / disable stuff

I just figured something out. 我只想出点什么。

I'm using Chrome browser, and if a website is using JQuery you can then use Chrome dev tools to execute javascript to alter the website ie Enable buttons which shouldn't be enabled. 我正在使用Chrome浏览器,如果网站使用的是JQuery,您可以使用Chrome开发工具执行javascript来更改网站,即启用不应启用的按钮。

if you run the normal code document.getElementById('myId').disabled = false or document.getElementById('myId').enabled = true then it does nothing. 如果你运行普通代码document.getElementById('myId').disabled = falsedocument.getElementById('myId').enabled = true那么它什么都不做。

But as soon as you run $('#myId').attr('disabled', false); 但是只要你运行$('#myId').attr('disabled', false); then the component actually enables and you are then able to click it. 然后组件实际启用,然后您可以单击它。

Is it possible with JQuery to block out these type of executions? JQuery是否可以阻止这些类型的执行?

So are you asking if you can use jQuery to prevent people from running additional javascript/jQuery from the browser console? 所以你问你是否可以使用jQuery阻止人们从浏览器控制台运行额外的javascript / jQuery? No, you cannot do this, the console is built into the browser for developers to test and experiment with by running additional javascript after/while javascript on the page is running. 不,你不能这样做,控制台内置在浏览器中供开发人员通过在页面上运行javascript后运行其他javascript来测试和试验。 Same thing goes for other browsers as well. 其他浏览器也是如此。

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

相关问题 Chrome开发者工具-您可以撤消控制台中的更改吗? - Chrome Dev Tools - Can you undo changes in the console? 在Chrome开发工具中禁用单个JS脚本 - Disable a Single JS Script in Chrome Dev Tools 从Chrome Dev Tools回溯中排除jQuery - Excluding jQuery from Chrome Dev Tools backtrace 有没有办法通过 Python 加载网页的网络活动(您可以在 Chrome Dev Tools 上看到)? - Is there a way to get a webpage's Network activity (which you can see on Chrome Dev Tools) on load via Python? jQuery .click函数不起作用,如何在chrome开发工具中查看? - jquery .click function not working, way to see in chrome dev tools? Chrome开发工具将jQuery对象的打印数组显示到屏幕上 - Chrome dev tools display of printing array of jQuery objects to the screen 在Chrome Dev Tools控制台中记录jQuery对象时显示元素? - Show Elements when logging jQuery object in Chrome Dev Tools console? JQuery hover 选择器适用于 Chrome 开发工具,但不适用于代码 - JQuery hover selector works in Chrome dev tools but not in code 如何在Chrome Dev Tools中使用jQuery遍历执行上下文? - How do I traverse Execution Contexts with jQuery in Chrome Dev Tools? 尽管Chrome Dev Tools控制台验证,jQuery slice()仍无法正常工作 - jQuery slice() Not Working Despite Chrome Dev Tools Console Verification
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM