语法解释: $("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发 var checkText=$("#select_id").find("option:selected").text(); //获取Select选择的Text var checkValue=$("#select_id").val(); //获取Select选择的Value
switch case多值匹配一般有两种情况 1.列举(将所有值列举出来) var n= 3;switch (n){ case 1: case 2: case 3: console.log("0~3"); break; default: console.log("都不是"); break;} 2.利用布尔值true var n= 1;switch (true){ case n&
Tour In the kingdom of Henryy, there are N (2 <= N <= 200) cities, with M (M <= 30000) one-way roads connecting them. You are lucky enough to have a chance to have a tour in the kingdom. The route should be designed as: The route should contain o
奔小康赚大钱 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12628 Accepted Submission(s): 5548 Problem Description 传说在遥远的地方有一个非常富裕的村落,有一天,村长决定进行制度改革:重新分配房子.这可是一件大事,关系到人民的住房问题啊.村里共有n间房间,刚好有n家老百姓,考虑
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1853 Cyclic Tour Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/65535 K (Java/Others) Total Submission(s): 1904 Accepted Submission(s): 951 Problem Description There are N cities in our c
传送门:http://poj.org/problem?id=3565 Ants Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 7650 Accepted: 2424 Special Judge Description Young naturalist Bill studies ants in school. His ants feed on plant-louses that live on apple tree
传送门:http://poj.org/problem?id=2195 Going Home Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 26151 Accepted: 13117 Description On a grid map there are n little men and n houses. In each unit time, every little man can move one unit st