好帮手k006平台5平台新手求助

新手求助 ~~_梦幻诛仙吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0可签7级以上的吧50个
本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:95,639贴子:
新手求助 ~~
庆典大礼锦盒里面能开什么?
是抽奖盒子吗?
有抽天狐的盒子好吗?
作为单纯的书迷的你,是...
三途河畔鬼话生,青梅煮...
爱上宇宙,爱上宇宙吧
杨紫秦俊杰恋情曝光
一晃眼小学生们都开始放...
随着这批小生的崛起,他...
2017年第一个流行语就这...
特邀专访嘉宾@Coser希小...
因一部网剧爆红的明星盘点
◆俗话说,一木不成林,...
【升华版】如果你爱豆一...
电影《黄金时代》的海报...
贴吧热议榜
使用签名档&&
保存至快速回贴新手求助_我家宝宝现在两个月了,我是山东的 现在属于7度至-_宝宝树
我家宝宝现在两个月了,我是山东的 现在属于7度至-3度左右 我家天天开着空调 宝宝最近为何天天受凉 吐奶吐酸水带奶瓣 急死我了 求有经验的姐妹们分析指教一下万分感激!
怎么没人理我
姐妹们快指教指教
不了解,帮顶吧
谢谢亲爱的
回复 &末念奇石馆&
17:21:17发表的
不了解,帮顶吧
新手求助相关的更多内容:
[知识] [知识] [知识] [知识] [知识] [知识] [日记] [日记] [日记] [日记] [日记] [日记]
需要账号和密码的外链可能是钓鱼网站,为了您的账号和财产安全,请勿提供任何有效信息!新手求助_javascript吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:130,524贴子:
新手求助收藏
&%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%&&%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%&&%@ page import="com.classes.account.*" %&&!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&&html&
&base href="&%=basePath%&"&
&title&选课&/title&
&meta http-equiv="pragma" content="no-cache"& &meta http-equiv="cache-control" content="no-cache"& &meta http-equiv="expires" content="0"&
&meta http-equiv="keywords" content="keyword1,keyword2,keyword3"& &meta http-equiv="description" content="This is my page"& &!-- &link rel="stylesheet" type="text/css" href="styles.css"& --&
body{background:#FFFFFF;}
.myMetro{position:top:250left:15overflow:zoom:1;margin:0}
.MBox{float:}
.widgetBox{position:overflow:width:180height:160}
.widgetBox input{width:180 height:160 opacity:0.1;z-index: 1}
.widgetBox label.checked{width:169height:151display:border:3px solid #FFFFFF;position:background:url() 249px 0 no-top:0;right:1z-index:2;text-align:padding: 10}
.widgetBox label.unchecked{width:169height:151display:position:background:url() 249px 0 no-top:0;right:1z-index:2;text-align:padding: 10}
.innerBox input{display:width:100%;height:100%;outline:text-decoration:z-index:1;opacity: 0.1}
.innerBox label.checked{width:359height:151display:border:3px solid #FFFFFF;position:background:url() 249px 0 no-top:0;right:1z-index:2;text-align:padding: 10}
.innerBox label.unchecked{width:359height:151display:position:background:url() 249px 0 no-top:0;right:1z-index:2;text-align:padding: 10}
border:solid 1px #
padding:15
background:#
-webkit-border-radius: .3
-moz-border-radius: .3
border-radius: .3
font-family: Helvetica, Arial, sans-
font-size:18
font-weight:
color:#666; } &/style& &script&
var course_id=course_name=teacher_id=course_credit=start_week=end_week=classroom_id=new Array(100);
/* 格子排序 */
var metro = {};
var number = 0;
metro.init=function(wrap){
metro.gen={w:190,h:170};
metro.wrap =
metro.sizeArray= []; //格子,[1,2]就表示1X2的大格子
metro.preset();
metro.putData(wrap);
metro.preset = function(){
metro.nameSpace= {};
metro.maxY = -1;
metro.basePos = {x:0, y:0};
metro.memory = {flag:Infinity, x: Infinity, y:Infinity};
metro.row = document.documentElement.offsetWidth / metro.gen.w && 0;
metro.wrap.style.width = metro.row * metro.gen.w + "px";
metro.resort=function(){
metro.preset();
metro.mbox = $class("MBox");
metro.sort(metro.sizeArray);
metro.putData = function(list){
(function setBig(){
//大格子初始化设置
var bigBox = $class("bigBox",list);
if(bigBox.length==0)
var i = 0, nx, ny, bigBoxC
while(i & bigBox.length){
bigBoxCont =
$class("innerBox",bigBox[i]);
nx = Math.ceil(bigBoxCont[0].offsetWidth / metro.gen.w); //bigBox横向占的块数
ny = Math.ceil(bigBoxCont[0].offsetHeight / metro.gen.h);
bigBox[i].style.width = nx*metro.gen.w - 10 + 'px' ;
bigBox[i].style.height = ny*metro.gen.h - 10 + 'px' ;
metro.mbox = $class("MBox",list);
var i = 0 , nx, ny, tempSizeArray = [];
while( i & this.mbox.length){
if( $class("bigBox",this.mbox[i]).length & 0 ){
nx = Math.ceil(this.mbox[i].offsetWidth / this.gen.w);
nx = (nx & this.row) ? this.row : //bigBox宽度尺寸过大
ny = Math.ceil(this.mbox[i].offsetHeight / this.gen.h);
tempSizeArray.push([nx,ny]);
tempSizeArray.push([1,1]);
this.sizeArray = this.sizeArray.concat(tempSizeArray);
metro.sort(tempSizeArray);
metro.sort = function(size){
var x = metro.basePos.x,
y = metro.basePos.y,
memory = metro.memory,
for(var n=0; n & size. n++){
if(memory.flag == 0){
x = memory.x;
y = memory.y;
memory.flag --;
if(x & metro.row-1){ //换行
name = x+'_'+y;
//对象属性名(反映占领的格子)
if(name in this.nameSpace) {
//判断属性名是否存在
memory.flag & Infinity && memory.flag++;
if(size[n][0] * size[n][1] == 1){
//普通格子
metro.nameSpace[name]=[x,y];
//项值(反映坐标值)
setPos(x,y,n);
if(beOver(x,y,size[n])) {
if(memory.y & y){
memory.y =
memory.x =
if(memory.y & Infinity) memory.flag = 1;
metro.nameSpace[name] = [x,y];
setPos(x,y,n);
hold(x,y,size[n]);
x += size[n][0];
if(memory.flag == -1) memory = {flag:Infinity ,x: Infinity, y:Infinity};
metro.maxY = Math.max(metro.maxY, y + size[n][1]);
metro.basePos = {"x":x,"y":y};
metro.memory =
metro.wrap.style.height= metro.gen.h * metro.maxY +'px';
function beOver(x,y,item){
//判断是否会重叠
if(x + item[0] & metro.row) //超出显示范围
for(var k=1; k&item[1]; k++){
name=x+'_'+(y-0+k);
if(name in metro.nameSpace) //左侧一列有无重叠
for(k=1; k&item[0]; k++){
name=(x-0+k)+'_'+y;
if(name in metro.nameSpace) //上侧一行有无重叠
function hold(x,y,item){
//大格子多占的位置
for(var t=0; t & item[0]; t++) {
for(var k=0; k & item[1]; k++){
name = (x+t)+'_'+(y+k);
if(t==0 && k==0)
metro.nameSpace[name] = 0;
//多占的格子无坐标值
function setPos(x,y,n){
var left = metro.gen.w * x,
top = metro.gen.h *
metro.mbox[n].style.cssText = "position:left:"+ left +"top:" + top + "";
}; &/script&
&body& &%@ include file="head.jsp" %&
ChoosingCourse myChoosingCourse=new ChoosingCourse();
myChoosingCourse.getAllCoursesAvailable();
int Number=myChoosingCourse.getCourseNumber();
String[] courseid=myChoosingCourse.getCourse_id();
String[] coursename=myChoosingCourse.getCourse_name();
String[] teacherid=myChoosingCourse.getTeacher_id();
String[] coursecredit=myChoosingCourse.getCourse_credit();
String[] startweek=myChoosingCourse.getStart_week();
String[] endweek=myChoosingCourse.getEnd_week();
String[] classroomid=myChoosingCourse.getClassroom_id();
for(int i=0;i&Ni++)
System.out.print(coursecredit[i]); %&
&% for(int j=0;j&Nj++) {%&
course_id[&%=j%&]=&%= courseid[j] %&;
course_name[&%=j%&]=&%=coursename[j] %&;
course_credit[&%=j%&]=&%=coursecredit[j] %&;
teacher_id[&%=j%&]=&%=teacherid[j] %&;
start_week[&%=j%&]=&%=startweek[j] %&;
end_week[&%=j%&]=&%=endweek[j] %&;
classroom_id[&%=j%&]=&%=classroomid[j] %&;
&div class="CourseFormDiv" align="center"&
&form name="course_form" method="post" action=""&
&input name="submit" type="submit" value="提交" style="position:top:180left:525"&
&div id="myMetro" class="myMetro"&&/div&
&/form& &/div&
&script& function $id(o){
return document.getElementById(o); } function $class(className) {
var parent = arguments[1] ||
if(parent.length && parent !== window && parent.tagName !== "select") {
var nodes =[];
for(var i=0, l = parent. i & i++){
var elms = get(parent[i]);
for (var j = elms.length - 1; j &= 0; j--) {
nodes.push(elms[j]);
return get(parent);
function get(parent){
if(parent.getElementsByClassName){
parent.getElementsByClassName(className);
var tag = arguments[2] || '*';
var returnElements = [];
parent.getElementsByTagName(tag);
className = className.replace(/\-/g, "\\-");
var pattern = new RegExp("(^|\\s)"+className+"(\\s|$)");
var i = 0;
while(i & els.length){
if (pattern.test(els[i].className) ) {
returnElements.push(els[i]);
return returnE
} } //随机数据 var myMetro = $id("myMetro"),
colorList = ['00ff00','ff5511','00ffff','ff8888','ff3eff'],
color = colorList[0];
function createTestData(n){
var spanWrap = document.createElement("span"),
content = "";
for(var i = 0; i & i++) {
color = colorList[(colorList.length * Math.random())&&0];
if(!(Math.random()*3 && 0)){ //输出大&a href='模块.html' target='_blank'&&u&模块&/u&&/a&测试数据。宽高在一个范围内都是随意的,未做其他限制
height = Math.floor(0*200 + 100);
width = Math.floor(1*200 + 100);
content += '&div class="MBox"&&div class="widgetBox bigBox" style="background:#'+color+'"&&div style="width:370height:160margin:0" class="innerBox"&&label className="label" for="checkbox_'+(number+i)+'" class="unchecked" id="label_'+(number+i)+'"&'+course_id[i]+'&br/&asdf&/label&&input type="checkbox" className="check_box"
id="checkbox_'+(number+i)+'" &&/div&&/div&&/div&';
}else{ //输出普通&a href='模块.html' target='_blank'&&u&模块&/u&&/a&数据
content += '&div class="MBox"&&div class="widgetBox" style="background:#'+color+'"&&label className="label" for="checkbox_'+(number+i)+'" class="unchecked" id="label_'+(number+i)+'" &'+course_id[i]+'&/label&&input type="checkbox" className="check_box"
id="checkbox_'+(number+i)+'"&&/div&&/div&';
number=number+n;
spanWrap.innerHTML =
myMetro.appendChild(spanWrap);
return spanW } window.onload = function(){
createTestData("&%=Number %&");
metro.init(myMetro); }; window.onresize = function(){
metro.resort(myMetro); }; /* window.onscroll=function(){
var scrollTop = document.body.scrollTop || document.documentElement.scrollTop,
windowHeight = document.documentElement.clientHeight,
documentHeight = document.body.offsetH
if(windowHeight + scrollTop & documentHeight - 50){
metro.putData(createTestData(15));
} }; */ &/script&
&/body&&/html&如上,我在content中引用course_id[i]发现总是会出现undefined。请问怎么回事??
票牛教你如何买到热门、便宜、真实的演出门票!
这还新手,都写这么多代码!我只是一个过路的!!
登录百度帐号推荐应用
为兴趣而生,贴吧更懂你。或

我要回帖

更多关于 好帮手k005平台 的文章

 

随机推荐