String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
My JSP 'index.jsp' starting pagefunction ckl()
{
}
function ss()
{
$("one").css("display","none");
$("two").css("display","block");
}
function dosth(){
document.getElementById("two").style.display="block";
document.getElementById("one").style.display="none";
}
用户名: | |
密码: | |
用户名: | |
密码: | |
我用方法dosth()或ss()都实现不了一个现实一个隐藏为什么啊,求解,各位大牛
页面上有没有和one、two一样的id?
function hiden(){
$("#ID").hide();//hide()函数,实现隐藏,括号里还可以带一个时间参数(毫秒)例如hide(500)以500毫秒的速度隐藏,还可以带slow,fast
}
function show(){
$("#ID").show();//显示,参数说明同上
}
这样也行jquery id引用要加 # $("#one").css("display","none");
function ss()
{
$("#one").css("display","none");
$("#two").css("display","block");
}
jquery 根据ID获取元素时,要加一个井号 “#”