Day4-----score

//--------------------------使用遍历完成星星的评分,使用innerHTML完成评价

<html>
<head><title>score</title></head>
<style type="text/css">
    body{font-size: 20px;font-weight: bold;}
    img{width: 30px;height: 30px;}
    li{list-style-type: none;float: left;}
    #text{width: 100px;height: 30px;border: 1px solid #CCC;float: left;text-align: center;}
</style>
<script type="text/javascript">
    window.onload=function(){
        var i;
        var timer;
        var text=["terrible","bad","normal","good","great"];
        oImg=document.getElementsByTagName(‘img‘);
        oDiv=document.getElementById(‘text‘);
        for(i=0;i<oImg.length;i++){
            oImg[i].src="pic/gray.png";
            oImg[i].index=i;
            oImg[i].onmouseover=function(){
                for(i=0;i<oImg.length;i++) oImg[i].src="pic/gray.png";
                for(i=0;i<(this.index+1);i++)    oImg[i].src="pic/gold.png";
                oDiv.innerHTML=text[this.index];
            }
            oImg[i].onclick=function(){
                for(i=0;i<(this.index+1);i++) oImg[i].src="pic/gold.png";
            }
        } 

    }
</script>
<body>
    <ul>
        <li><img /></li>
        <li><img /></li>
        <li><img /></li>
        <li><img /></li>
        <li><img /></li>
        <div id="text">Score</div>
    </ul>
</body>
</html>
时间: 2024-08-02 08:59:07

Day4-----score的相关文章

设有一数据库,包括四个表:学生表(Student)、课程表(Course)、成绩表(Score)以及教师信息表(Teacher)。四个表的结构分别如表1-1的表(一)~表(四)所示,数据如表1-2的表(一)~表(四)所示。用SQL语句创建四个表并完成相关题目。

表(一)Student (学生表) -- Create table create table STUDENT ( sno VARCHAR2(3) not null, sname VARCHAR2(8) not null, ssex VARCHAR2(2) not null, sbirthday DATE, class VARCHAR2(5) ) tablespace USERS pctfree 10 initrans 1 maxtrans 255; -- Add comments to the

day4

day4: 经过一天的考试与测评,我发现自己在审题和考虑情况方面有很大的不足,以后要留意不同数据出现时发生的所有情况,不要遗漏数据输出时使用的库. #include〈iostream〉 using namespace std: int main() { int n,m; cin>>m>>n; for(int i=1;i<=m;i++) { for(int j=1;j<n;j++) cout<<'*'<<' '; cout<<'*'&l

机器学习中的 precision、recall、accuracy、F1 Score

1. 四个概念定义:TP.FP.TN.FN 先看四个概念定义: - TP,True Positive - FP,False Positive - TN,True Negative - FN,False Negative 如何理解记忆这四个概念定义呢? 举个简单的二元分类问题 例子: 假设,我们要对某一封邮件做出一个判定,判定这封邮件是垃圾邮件.还是这封邮件不是垃圾邮件? 如果判定是垃圾邮件,那就是做出(Positive)的判定: 如果判定不是垃圾邮件,那就做出(Negative)的判定. Tru

sitecore+score 在 Experience editor 添加新元素时associateed content 指向错误

Q:在sitecore的Experience editor页面添加component时,子元素的路径指向错误.如图: A: 首先你要整理思路,这个设置可能是在哪,是template还是control layout.当然这里肯定是跟页面control有关. 1.我们需要找到这个button的control layout.因为我们的项目是集成了score,所以根据score的手册我们知道这个button的路径在/sitecore/layout/Renderings/BootstrapUI/Conte

out of memory kill process (java) score or a child

最近在跑大数据,发现 out of memory kill process (java) score or a child,查资料发现是操作系统linux low mem 太低,后来加大内存一样不管用,开始分析代码: 将代码中的String 字符串拼接改成StringBuilder(单线程速度比StringBuffer快) 将获取文件名称的方法file.listFiles() 改成 file.list() 将代码中的不必要的创建对象.数组开销去掉,尤其是在循环里 发现仍然有问题,通过free -

查询score中选学多门课程的同学中分数为非最高分成绩的记录。

20.查询score中选学多门课程的同学中分数为非最高分成绩的记录. select * from score a where sno in ( select sno from score group by sno having count(1)>1) and a.degree<(select max(degree) from score b where a.cno=b.cno  )

ZOJ 3819 Average Score(平均分)

[题目描述] English 中文 Bob is a freshman in Marjar University. He is clever and diligent. However, he is not good at math, especially in Mathematical Analysis. After a mid-term exam, Bob was anxious about his grade. He went to the professor asking about t

2014ACM/ICPC亚洲区域赛牡丹江站现场赛-A ( ZOJ 3819 ) Average Score

Average Score Time Limit: 2 Seconds      Memory Limit: 65536 KB Bob is a freshman in Marjar University. He is clever and diligent. However, he is not good at math, especially in Mathematical Analysis. After a mid-term exam, Bob was anxious about his

leetcode day4 -- Binary Tree Postorder(Preorder) Traversal &amp;&amp; Edit Distance

 1.Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [3,2,1]. Note: Recursive solution is trivial, could you do it iteratively? 分析:后续遍历

day4 迭代器与生成器解析

一.迭代器 迭代器是访问集合元素的一种方式.其实迭代器就是一种列表,只是访问集合元素的时候比较特殊,具有一些特定功能,记忆功能,能够记住用户上一次的状态.迭代器是访问集合元素的一种方式.并且,迭代器只能前进,不能后退.迭代器对象从集合的第一个元素开始访问,直到所有的元素被访问完结束. 特定: (1).访问者不需要关心迭代器内部的文件,仅需通过next()方法不断去取下一个内容: (2).不能随机访问集合中的某个值,只能从头到尾依次访问: (3).访问到一半时不能往回退: (4).便于循环比较大的