Home > Web Front-end > HTML Tutorial > How to change or invalidate a script on the page? _html/css_WEB-ITnose

How to change or invalidate a script on the page? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:05:00
Original
1932 people have browsed it

There is a script in the browsed page that prevents menus and content selection. As follows:

.....

.....
How to make it invalid? ?

Note: If you don’t want to disable scripts, other scripts are still useful!

There are also code methods found online
================================= =========================
Create a new text document on the desktop, and enter the following code into the document.
[InternetShortcut]
URL=javascript:function document.
oncontextmenu(){return true;}function
document.onselectstart(){return true;}function
document.onsdragstart() {return true;}
(Note: All punctuation marks are in English, otherwise it cannot be executed)
Save the notepad with the file name of "unrestriction.url", the save type is "all files", and finally select The saved location is the "Links" folder under the current system favorites directory (for example: D Favorites Link). Open the IE browser, right-click the mouse on the toolbar, enable the "Link" toolbar, so that "Unrestriction" will appear here as a small button. In the future, when you see a webpage that needs to be cracked, just click "Unrestrict" to copy the content on the webpage.
=============================================== ================
I did it but it didn’t work.


Reply to discussion (solution)

The test page address is here:
http://www.3gonet.net. cn/show_news.asp?id=360

For the event binding method of this kind of object, you can just redefine it and overwrite the original method.


document.oncontextmenu = null;document.onselectstart = null;
Copy after login


Just add this code after the code you want to overwrite.

You can even use JS to execute this code directly as a function. It will overwrite the original one.

Give it a try.

Thank you upstairs.
I tried inserting the following code after it
                                           < =new Function("event.returnValue=true;");

But it didn’t take effect.
Later, a span was inserted, and document.oncontextmenu=return true....
was executed successfully again in its onclick.



Add a question: For the page of this test address http://www.3gonet.net.cn/show_news.asp?id=360
Open the display page in IE There is an error, but it does not affect page scrolling.
Open in webbroswer (note: set wb.silent=true! Otherwise, hey), it gets stuck when scrolling.

Why does the page get stuck when silent=true is set, but not in IE? Did ie do any special processing?

I have never been exposed to WebBrowser, so I don’t know.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template