php根据html的id修改,【 H5EDU咨询】php html代码如何实现 根据自己的id 才能查看自...

这段代码实现了一个网页成绩查询系统,只有输入正确ID的用户才能查看自己的成绩。系统使用JavaScript进行事件监听和页面动态调整,当鼠标悬停在特定区域时显示成绩,点击可以展开或关闭详细成绩。同时,代码中包含了一些关于页面布局和高度自适应的处理。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

就是根据自己的id号才能点开查看自己的成绩 否则是点不开 或者弹出提示“只允许查看自己的成绩”下面是代码部分:

$(function(){

window.parent.set_iframe_height("iframea_bitem","bitem",document.body.offsetHeight+120);

window.onclick=function(){

window.parent.set_iframe_height("iframea_bitem","bitem",document.body.offsetHeight+120);

};

$(".AllRecR").mousemove(function(){

$(this).css("border","1px solid #eee");

$(this).find(".user_see_code").show();

});

$(".AllRecR").mouseleave(function(){

$(this).css("border","1px solid #f8f8f8");

if($(this).find(".user_see_code").attr("see") == 'off'){

$(this).find(".user_see_code").hide();

}

});

$(".user_see_code").click(function(){

if($(this).attr("see")=='off'){

$(this).attr("see","on");

$(this).text("关闭成绩");

$(this).parents().next().show();

var id = $(this).attr("id");

$.get(

"?/mobile/mobile/open/" + id,

{

},

function(){

}

);

}else{

$(this).text("显示成绩")

$(this).attr("see","off");

$(this).parents().next().hide();

}

});

$(".user_codes_js").click(function(){

var codes = $(this).prev();

if($(this).attr("click") == 'off'){

var num = $(this).attr("num");

var line = Math.ceil(num / 7) * 20;

codes.css("max-height",line+"px");

$(this).attr("click","on");

$(this).text("收起全部↑");

}else{

codes.css("max-height","260px");

$(this).attr("click","off");

$(this).text("展开查看全部↓");

}

});

});

codes.css("max-height","260px");

$(this).attr("click","off");

$(this).text("展开查看全部↓");

}

});

});

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值