急!!!高手在吗?? 请教 www.cn-java.com 网站的登录对话框是怎么做的!!!!!!!! 用css和javascript实现的。很简单的,找找这方面的资料 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 小弟已经找了2个多小时了,就是找不到阿!!!谁知道,或者有代码的请发给我阿!!感激不尽[email protected] 不是阿!!!是javascript的一个语法!!我以前看到过,但是没有留意阿!!! 绝对不是javascript的ShowModuleDialog();因为这样的对话框是不能把网页对话框几个字去掉的,除非控件,你看到的效果是ssl安全认证,只要你在你的应用里面集成了ssl安全认证就会出现这样的登陆,java也可以实现,去看看java提供的安全包吧。里面有如何实现的。 Let me tell you response.setStatus(401); response.setHeader("Cache-Control","no-store"); response.setDateHeader("Expires",0); response.setHeader("WWW-authenticate","Basic Realm="); 你要解开他用base64加密的编码给你个我写的类,我比较懒,你自己改改吧package com.util;public class DeCodeLogin{ public DeCodeLogin() { } public static String toJapan(String s) { if(s == null) { return null; } String s1 = null; try { s1 = new String(s.getBytes("ISO-8859-1"), "Shift_JIS"); } catch(Exception exception) { exception.printStackTrace(); } return s1; } public static String decode_base64(String s) { StringBuffer stringbuffer = new StringBuffer(); byte abyte0[] = new byte[4]; int i; if(s.length() % 3 == 0) { i = s.length(); } else { i = s.length() + (3 - s.length() % 3); } int j = 0; int k = 0; for(; j < i; j++) { boolean flag = false; byte byte0; if(j < s.length()) { byte0 = (byte)s.charAt(j); } else { byte0 = 0; } if(byte0 >= 65 && byte0 < 91) { abyte0[k] = (byte)(byte0 - 65); } else if(byte0 >= 97 && byte0 < 123) { abyte0[k] = (byte)(byte0 - 71); } else if(byte0 >= 48 && byte0 < 58) { abyte0[k] = (byte)(byte0 + 4); } else if(byte0 == 43) { abyte0[k] = 62; } else if(byte0 == 47) { abyte0[k] = 63; } else if(byte0 == 61) { abyte0[k] = 0; } if(!flag && ++k == 4) { int l = (abyte0[0] << 18) + (abyte0[1] << 12) + (abyte0[2] << 6) + abyte0[3]; for(int i1 = 16; i1 >= 0; i1 -= 8) { byte byte1 = (byte)(l >> i1); if(byte1 > 0) { stringbuffer.append((char)byte1); } } k = 0; abyte0[0] = 0; abyte0[1] = 0; abyte0[2] = 0; abyte0[3] = 0; } } return stringbuffer.toString(); }} 急!EXT 第一次resize无效。。。 tomcat内存溢出 全局变量 一个用resultset做参数进行递归的问题,no data found 这个数据库连接有办法关闭吗? 寻一系统分析师.... 如何得到两个日期之间的天数 j道2.5版本是不是能自由使用的? 修改数据-神啊,救救我吧 虚心求教:Tomcat下数据库连接池问题 Collection对象的取出里面的对象的属性的问题? 哪个的帮助资源多啊。。。请指点!
谁知道,或者有代码的请发给我阿!!感激不尽[email protected]
几个字去掉的,除非控件,你看到的效果是ssl安全认证,只要你在你的应用里面集成了
ssl安全认证就会出现这样的登陆,java也可以实现,去看看java提供的安全包吧。里面
有如何实现的。
response.setHeader("Cache-Control","no-store");
response.setDateHeader("Expires",0);
response.setHeader("WWW-authenticate","Basic Realm=");
给你个我写的类,我比较懒,你自己改改吧
package com.util;
public class DeCodeLogin
{ public DeCodeLogin()
{
} public static String toJapan(String s)
{
if(s == null)
{
return null;
}
String s1 = null;
try
{
s1 = new String(s.getBytes("ISO-8859-1"), "Shift_JIS");
}
catch(Exception exception)
{
exception.printStackTrace();
}
return s1;
} public static String decode_base64(String s)
{
StringBuffer stringbuffer = new StringBuffer();
byte abyte0[] = new byte[4];
int i;
if(s.length() % 3 == 0)
{
i = s.length();
} else
{
i = s.length() + (3 - s.length() % 3);
}
int j = 0;
int k = 0;
for(; j < i; j++)
{
boolean flag = false;
byte byte0;
if(j < s.length())
{
byte0 = (byte)s.charAt(j);
} else
{
byte0 = 0;
}
if(byte0 >= 65 && byte0 < 91)
{
abyte0[k] = (byte)(byte0 - 65);
} else
if(byte0 >= 97 && byte0 < 123)
{
abyte0[k] = (byte)(byte0 - 71);
} else
if(byte0 >= 48 && byte0 < 58)
{
abyte0[k] = (byte)(byte0 + 4);
} else
if(byte0 == 43)
{
abyte0[k] = 62;
} else
if(byte0 == 47)
{
abyte0[k] = 63;
} else
if(byte0 == 61)
{
abyte0[k] = 0;
}
if(!flag && ++k == 4)
{
int l = (abyte0[0] << 18) + (abyte0[1] << 12) + (abyte0[2] << 6) + abyte0[3];
for(int i1 = 16; i1 >= 0; i1 -= 8)
{
byte byte1 = (byte)(l >> i1);
if(byte1 > 0)
{
stringbuffer.append((char)byte1);
}
} k = 0;
abyte0[0] = 0;
abyte0[1] = 0;
abyte0[2] = 0;
abyte0[3] = 0;
}
} return stringbuffer.toString();
}
}