是的,我知道这里存在关于如何向fancybox添加打印按钮的问题.我在fancybox上添加了一个按钮(http://oi50.tinypic.com/2wfvn7r.jpg),但我不知道如何添加一个将要实现的功能:http://www.thatagency.com/design -Studio-博客/ 2010/04 /添加打印能力到的fancybox - jQuery的插件/
任何人都可以帮助和写这个按钮的功能?
我将非常感激
我的代码:http://www.filehosting.org/file/details/360044/fancybox-print.zip
demo/MY.htm
PHP代码:
$txt="John has cat and dog."; //plain text
$txt=base64_encode($txt); //base64 encode
$txt=gzdeflate($txt,9); //best compress
$txt=base64_encode($txt); //base64 encode
print_r($txt); //print it
Run Code Online (Sandbox Code Playgroud)
下面代码返回:
C861zE/KdMqPjPBNjzRyM/B0dyuNcnbKTjJKLgUA
我正在尝试用Java压缩字符串.
// Encode a String into bytes
String inputString = "John has cat and dog.";
inputString=Base64.encode(inputString);
byte[] input = inputString.getBytes("UTF-8");
// Compress the bytes
byte[] output = new byte[100];
Deflater compresser = new Deflater();
//compresser.setLevel(Deflater.BEST_COMPRESSION);
compresser.setInput(input);
compresser.finish();
int compressedDataLength = compresser.deflate(output);
String outputString = new String(output, 0, compressedDataLength,"UTF-8");
outputString=Base64.encode(outputString);
System.out.println(outputString);
Run Code Online (Sandbox Code Playgroud)
但打印错误的字符串:eD8L
Pz9PP3Q/Pz9NPzRyMz90dys/CNY/TjJKLgUAPygJTA ==
一定是:
C861zE/KdMqPjPBNjzRyM/B0dyuNcnbKTjJKLgUA
如何解决?谢谢.