webpage

Is it possible to display the HTML Code of a webpage in a batch file?

我的梦境 提交于 2019-11-27 15:56:53
For my new program I want to echo the code of a webpage. I searched on google and Stack Overflow but didn´t found something like this. I do not want to use external programs like URL2FILE or something like this. This code is from a previous question that only needed to do the query to the server (linked in comments) with the "display" of the page source code added. @if (@This==@IsBatch) @then @echo off rem **** batch zone ********************************************************* setlocal enableextensions disabledelayedexpansion rem Batch file will delegate all the work to the script engine if

print page count with total number of pages using css

人盡茶涼 提交于 2019-11-27 15:37:45
I have a table which populated with dynamic data and to handle that in printing i have applied some page breaks to it everything works fine but i need to show a pagination like " Page 1 of 3 " and so on below every page while printing. I have tried with css but i can only print the current page number with it. is there any other way of achieving it ?? here is my code body { counter-reset: page; } .page-count:after { counter-increment: page; content: "Page " counter(page) " of " counter(pages); } Did you try this: @page { @bottom-right { content: counter(page) " of " counter(pages); } } 来源:

What are the ways to prevent users to take screenshot of a webpage? [duplicate]

℡╲_俬逩灬. 提交于 2019-11-27 13:29:18
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How do i prevent from printscreen of my webpage? I want to prevent users from taking screen shots of a web-page. What should be the code I have to place in that .html file? What should be the code to prevent button press like print screen? Because many website prevents users from pressing any keys. 回答1: It is possible. Try this css3 feature. @media print { html, body { display: none; /* hide whole page */ } }

jQuery web page height

早过忘川 提交于 2019-11-27 11:05:45
Let's say that a web page is twice the height of the browser window (thus there's a scroll bar). How do I retrieve the height of the web page in jQuery? $(window).height(); // returns height of browser viewport $(document).height(); // returns height of HTML document You could use the height() of the document. $(document).height(); Soyeb Ahmed This can work also. $('body').height(); 来源: https://stackoverflow.com/questions/1304378/jquery-web-page-height

Reading Web Pages using Excel VBA

折月煮酒 提交于 2019-11-27 09:35:17
I want to read web pages using Excel VBA. How do I carry out this task? Is it even possible? Coming from Excel 2003, yes this is possible - you may use the SHDocVw.InternetExplorer and MSHTML.HTMLDocument objects to call a web page, gain control over and interact with the DOM object. After creating references to Microsoft HTML Object Library (...\system32\MSHTML.TLB) and Microsoft Internet Control (...\system32\ieframe.dll) you can play with the following example: Sub Test() Dim Browser As SHDocVw.InternetExplorer Dim HTMLDoc As MSHTML.HTMLDocument Set Browser = New SHDocVw.InternetExplorer '

how to make images in my webpages not downloadable

我怕爱的太早我们不能终老 提交于 2019-11-27 08:23:09
问题 I am wondering how to prevent people from Save image as.. by right-click images on my webpages. I was thinking about disable right-click, but it seems I have to write javascript code. Is there a easy way to do this? 回答1: The simple answer is "you cannot do that". You might be able to put something on the server side that will check the referer before serving the image, but even that is not 100% guaranteed. Moreover, even if you did manage somehow to prevent this, nothing would prevent

How to get the content of a remote page with JavaScript?

倾然丶 夕夏残阳落幕 提交于 2019-11-27 07:02:26
问题 I have a URL of a remote page from a different domain which I have to download, parse, and update DOM of the current page. I've found examples of doing this using new ActiveXObject("Msxml2.XMLHTTP") , but that's limited to IE, I guess, and using new java.net.URL , but I don't want to use Java. Are there any alternatives? 回答1: Same domain policy is going to get you. 1) Proxy through your server. browser->your server->their server->your server->browser. 2) Use flash or silverlight. The 3rd

Library for Caching Web Pages on iPhone?

和自甴很熟 提交于 2019-11-27 06:12:34
问题 Is there a library or framework that I can use to cache web pages locally for offline viewing on iPhone? If not, what's the best strategy for doing so? Currently what I'm thinking of doing is downloading the HTML, harvesting its URLs, caching those URLs, then rewriting the HTML to point to local files. Is that the best way to do it? Thanks! 回答1: Take a look at Apple's sample code. Specifically, a program called URLCache http://developer.apple.com/iphone/library/samplecode/URLCache/index.html

Open webpage and parse it using JavaScript

时光毁灭记忆、已成空白 提交于 2019-11-27 05:17:15
问题 I know JavaScript can open a link in a new window but is it possible to open a webpage without opening it in a window or displaying it to the user? What I want to do is parse that webpage for some text and use it as variables. Is this possible without any help from server side languages? If so, please send me in a direction I can achieve this. Thanks all 回答1: You can use an XMLHttpRequest object to do this. Here's a simple example var req = new XMLHttpRequest(); req.open('GET', 'http://www

What's the best “file format” for saving complete web pages (images, etc.) in a single archive? [closed]

和自甴很熟 提交于 2019-11-27 05:12:59
问题 I'm working on a project which stores single images and text files in one place, like a time capsule. Now, most every project can be saved as one file, like DOC, PPT, and ODF. But complete web pages can't -- they're saved as a separate HTML file and data folder. I want to save a web page in a single archive, and while there are several solutions, there's no "standard". Which is the best format for HTML archives? Microsoft has MHTML -- basically a file encoded exactly as a MIME HTML email