Many people have reported to the author that after searching for information they are interested on the Internet, they want to copy the content of the relevant homepage, but the homepage of some websites cannot be copied. You can only print the home page, and the printed home page has header and footer, and the content and formatting are not in line with your personal needs.
After careful analysis of the homepage text that cannot be copied, it was found that the JavaScript program embedded in the homepage text was causing trouble. When the user copies and pastes the opened page, the IE browser will automatically call the Submit event. This event executes JavaScript code called "return false". The solution to this problem is to remove the JavaScript processing code for the event.
Taking Microsoft's IE browser as an example, the specific processing process is as follows:
Click "View → Source File" (when the homepage text is less than 64k bytes, the Notepad program will be automatically called to open; otherwise, open with the WordPad program), and look for the <body> statement, which is similar to the <body oncontextmenu="return false" onselectstart="return false" text="#000000" bgcolor="#ffffff" leftmargin="0" topmargin="0" marginheight="0"> statement. Delete the onselectstart="return false" clause. Save this deleted source file as a text file. Then change the suffix of this text file name to ".htm". Finally, open this file with IE browser.
At this time, you can save the required content in the format required by the user by copying and pasting (Note: Please pay attention to protecting the author's copyright when copying web page content).
After careful analysis of the homepage text that cannot be copied, it was found that the JavaScript program embedded in the homepage text was causing trouble. When the user copies and pastes the opened page, the IE browser will automatically call the Submit event. This event executes JavaScript code called "return false". The solution to this problem is to remove the JavaScript processing code for the event.
Taking Microsoft's IE browser as an example, the specific processing process is as follows:
Click "View → Source File" (when the homepage text is less than 64k bytes, the Notepad program will be automatically called to open; otherwise, open with the WordPad program), and look for the <body> statement, which is similar to the <body oncontextmenu="return false" onselectstart="return false" text="#000000" bgcolor="#ffffff" leftmargin="0" topmargin="0" marginheight="0"> statement. Delete the onselectstart="return false" clause. Save this deleted source file as a text file. Then change the suffix of this text file name to ".htm". Finally, open this file with IE browser.
At this time, you can save the required content in the format required by the user by copying and pasting (Note: Please pay attention to protecting the author's copyright when copying web page content).