Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

chrome download test

  • Loading branch information...
commit fef5815bf01237c28aac7a51c21914bb2370c893 1 parent 2d635ad
Fan Yu authored
View
BIN  JqueryTest.suo
Binary file not shown
View
39 JqueryTest/ImageList.htm
@@ -0,0 +1,39 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title></title>
+ <script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
+ <script src="Scripts/float.js" type="text/javascript"></script>
+</head>
+<body>
+
+ <a href="http://pic002.cnblogs.com/images/2012/429355/2012080820270130.jpg" title="Download" download>test download for chrome</a>
+ <script type="text/javascript">
+ var imgs = [];
+ var images = [];
+ $("img").each(function (index) {
+ imgs.push(this);
+ });
+ $(imgs).each(function (index) {
+ images.push(this.src);
+ });
+
+
+ var images_container = document.getElementById('image_downloader_images_container');
+ if (!images_container) {
+ images_container = document.createElement('div');
+ images_container.id = 'image_downloader_images_container';
+ images_container.style.display = 'none';
+ }
+ document.body.appendChild(images_container);
+
+ for (var i in images) {
+ var anchor = document.createElement('a');
+ anchor.href = images[i];
+ anchor.download = '';
+ images_container.appendChild(anchor);
+ anchor.click();
+ }
+ </script>
+</body>
+</html>
View
4 JqueryTest/JqueryTest.csproj
@@ -52,7 +52,9 @@
</ItemGroup>
<ItemGroup>
<Content Include="default.htm" />
- <Content Include="fry.jpg" />
+ <Content Include="images\fry.jpg" />
+ <Content Include="images\icon.gif" />
+ <Content Include="ImageList.htm" />
<Content Include="Scripts\float.js" />
<Content Include="Scripts\jquery-1.4.1-vsdoc.js" />
<Content Include="Scripts\jquery-1.4.1.js" />
View
5 JqueryTest/JqueryTest.csproj.user
@@ -4,9 +4,8 @@
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
- <StartPageUrl>
- </StartPageUrl>
- <StartAction>CurrentPage</StartAction>
+ <StartPageUrl>ImageList.htm</StartPageUrl>
+ <StartAction>SpecificPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
View
BIN  JqueryTest/images/fry.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  JqueryTest/images/icon.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.