可以帮我解决我的纠结是java [英] can some1 help with my kink is java

查看:49
本文介绍了可以帮我解决我的纠结是java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这项任务是制作7天开始的名单,只有一个开始,只有一个红色应该是红色的。 ive creted code only only problem is

自动让第1天变红,如果是星期天是星期几,那就没关系

6周以外的分配将是错误的,继承人代码。


"< html>< title> Marks JS< / title>


< body> < font size =" 4">


< script language =" JavaScript">


<! - - 隐藏在非Javascript浏览器中


var今天=新日期();


var DayNumber = Today.getDay();


var Day;


var weekday = new Array(14);


weekday [0] =" Sunday" ;;


weekday [1] =" Monday" ;;


weekday [2] =" Tuesday" ;;


weekday [3] =" Wednesday";


weekday [4] =" Thursday";


weekday [5] =" Friday";


weekday [6] =" Saturday";


工作日[7] =" Sunday";


工作日[8] =" Monday" ;;


工作日[9] =" ;星期二;


工作日[10] ="星期三;


工作日[11] =" Thursday";


工作日[12] =" Friday";


我们ekday [13] =" Saturday";


var color = new Array(14);


color [0] ="红色" ;;


color [1] =" blue";


color [2] =" green";


color [3] =" orange";


color [4] =" black";


color [5] =" yellow";


color [6] =" grey";


color [7 ] =" red";


color [8] =" Monday";


color [9] =" blue" ;


color [10] =" green";


color [11] =" orange";


color [12] =" black";


color [13] =" yellow";


i = Today.getDay();


for(i = 0; i< 7; i ++)


{


DayNumber = Today.getDay()+ i;


document.write("< font color =" + color + >" +"日期是 +

工作日[DayNumber] +"< br />< / font>");


}


//停止隐藏 - >


< / script>< / font>< / table>< / body>< / html> ;"

the assignment was to make list of 7 days starting with curent only
that red was supposed to be in red. ive creted code only problem is its
automatically makes 1st day red, which would be ok if day is sunday but
6 days out of week assignment will be wrong, heres code.

"<html><title>Marks JS</title>

<body> <font size = "4">

<script language = "JavaScript">

<!--Hide from non-Javascript browsers

var Today = new Date() ;

var DayNumber = Today.getDay() ;

var Day;

var weekday=new Array(14);

weekday[0]="Sunday";

weekday[1]="Monday";

weekday[2]="Tuesday";

weekday[3]="Wednesday";

weekday[4]="Thursday";

weekday[5]="Friday";

weekday[6]="Saturday";

weekday[7]="Sunday";

weekday[8]="Monday";

weekday[9]="Tuesday";

weekday[10]="Wednesday";

weekday[11]="Thursday";

weekday[12]="Friday";

weekday[13]="Saturday";

var color=new Array(14);

color[0]="red";

color[1]="blue";

color[2]="green";

color[3]="orange";

color[4]="black";

color[5]="yellow";

color[6]="gray";

color[7]="red";

color[8]="Monday";

color[9]="blue";

color[10]="green";

color[11]="orange";

color[12]="black";

color[13]="yellow";

i = Today.getDay();

for(i=0;i<7;i++)

{

DayNumber = Today.getDay() +i;

document.write("<font color = " + color + " >"+"The day is " +
weekday[DayNumber] + "<br/></font>") ;

}

//Stop hiding -->

</script></font></table></body></html>"

推荐答案



< ma ****** @ gmail.com>在留言中写道

news:11 ********************** @ u72g2000cwu.googlegr oups.com ...

<ma******@gmail.com> wrote in message
news:11**********************@u72g2000cwu.googlegr oups.com...
这项任务是制作7天开始的清单,只有那些红色应该是红色的。香港专业教育学院代码唯一的问题就是它会自动让第一天变成红色,如果一天是星期天,那就没关系了,但是每周工作6天就错了,继承人代码。

** snip ** document.write("< font color =" + color +">" +" The day is" +
weekday [DayNumber] + < br>< / font>");
the assignment was to make list of 7 days starting with curent only
that red was supposed to be in red. ive creted code only problem is its
automatically makes 1st day red, which would be ok if day is sunday but
6 days out of week assignment will be wrong, heres code.

**snip** document.write("<font color = " + color + " >"+"The day is " +
weekday[DayNumber] + "<br/></font>") ;



上面列出的代码中的
,如果您将第一行更改为:

document.write("< font color =" + color [DayNumber] +">" +" day is+

(添加数组变量名为color后的方括号中的索引

您的输出将(可能)执行您期望的操作。

您有其他错误和一些不赞成的标记和属性,但是那个

一点点改变都会让它发挥作用。



in your code listed above, if you change the first line to:
document.write("<font color = " + color[DayNumber] + " >"+"The day is " +
(Adding an index in square braces after the array variable named color)
Your output will (probably) do what you are expecting.
You have other errors and some deprecated tags and attributes, but that
little change will make it work.


omg,你工作得最好,我通过改变我的日程安排进行测试。 />

thx。


我有一份html工作我需要你有时间/有兴趣吗?我付钱

omg, you are teh greatest it worked, i tested by changing my schedule.

thx.

i have a html job i need done you got time/intrested? im paying


< qu ******* @ gmail.com>在消息中写道

新闻:11 ********************** @ i39g2000cwa.googlegr oups.com ...
<qu*******@gmail.com> wrote in message
news:11**********************@i39g2000cwa.googlegr oups.com...
omg,你是最好的工作,我通过改变我的日程测试。

thx。

我有一个html工作我需要你有时间/ intrested?我付钱
omg, you are teh greatest it worked, i tested by changing my schedule.

thx.

i have a html job i need done you got time/intrested? im paying




但我不是最好的 - (还)。我将在接下来的20年里成为一名学生。

我希望我再次成为青少年 - 这就是我什么都知道的。

而且不,但是谢谢 - 关于这份工作。

IMO,这个团队中最有帮助的海报是理查德·科尔福德和一个名为抢夺行动的b $ b。


祝你学习顺利。如果你做自己的工作,你会学到更多。



But I am not the greatest -( yet). I''ll be a student for the next 20 years.
I wish I was a teenager again - that''s when I knew everything.
and no, but thanks - about the job.
IMO, the most helpful of posters on this group are Richard Cornford and one
called RobG.

Good luck on your studies. And if you do your own work, you''ll learn more.


这篇关于可以帮我解决我的纠结是java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆