• 关于 html= 的搜索结果

回答

<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!-- ====================================================================================================================== 手持设备优化 --> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" /> <!-- =========================================================== 老式Viewport 黑莓 --> <meta name="HandheldFriendly" content="true"> <style> body{ margin:0; } /* //==================== 老式实现 */ #sidebar{ position:fixed; left:0; height:100%; width:5rem; background:red; } #content{ display: block; position:absolute; width:100%; height:100%; box-sizing:border-box; padding-left:5rem; background:blue; } </style> </head> <!-- //==================== 老式实现 --> <div id="content"> <div id="sidebar"> sidebar </div> <div class="content"> content </div> </div> </body> </html> 略新实现:(少嵌套一层,滚动基于body): <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <!-- ====================================================================================================================== 手持设备优化 --> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" /> <!-- =========================================================== 老式Viewport 黑莓 --> <meta name="HandheldFriendly" content="true"> <style> body{ margin:0; } body{ display: box; display: flex; } #sidebar{ position:fixed; left:0; height:100%; max-width:5rem; min-width:5rem; background:red; } #content{ height:100%; flex:1; background:blue; } </style> </head> <div id="sidebar"> sidebar </div> <div id="content"> content </div> </body> </html> 至于右侧响应式布局不是根据分辨率而且根据物理屏幕大小,请使用下面的JS取得屏幕PPI后,依据其分辨率的比值,获得该匹配屏幕大小的CSS即可; html <div id="ppitest" style="width:1in;visible:hidden;padding:0px"></div> js screenPPI = document.getElementById('ppitest').offsetWidth;

a123456678 2019-12-02 02:07:33 0 浏览量 回答数 0

回答

题主您好, 现在应该可以访问了喔(域名挺有个性的): --2018-04-02 10:42:18-- http://chao168.top/Resolving chao168.top (chao168.top)... 45.199.152.190Connecting to chao168.top (chao168.top)|45.199.152.190|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 2880 (2.8K) [text/plain]Saving to: 'index.html'index.html 100%[========================================>] 2.81K --.-KB/s in 0s2018-04-02 10:42:18 (12.0 MB/s) - 'index.html' saved [2880/2880]

dongshan8 2019-12-02 00:48:27 0 浏览量 回答数 0

问题

请教云效自定义构建环境的用法

kinfen 2019-12-01 19:40:14 558 浏览量 回答数 1

新用户福利专场,云服务器ECS低至102元/年

新用户专场,1核2G 102元/年起,2核4G 699.8元/年起

问题

jquery.form.js 二次提交出错

小旋风柴进 2019-12-01 20:27:38 1212 浏览量 回答数 1

问题

使用JQUERY 将所有的a href的值加上 &tn=tn001,求个简单快速度的代码

a123456678 2019-12-01 20:20:24 753 浏览量 回答数 1

回答

题主您好, 现在测试,好象可以正常访问80端口了喔: --2017-06-03 11:37:49-- http://139.196.170.69/Connecting to 139.196.170.69:80... connected. HTTP request sent, awaiting response... 302 FoundLocation: https://www.meetqy.com/ [following]converted 'https://www.meetqy.com/' (ANSI_X3.4-1968) -> 'https://www.meetqy.com/' (UTF-8)--2017-06-03 11:37:49-- https://www.meetqy.com/Resolving www.meetqy.com (www.meetqy.com)... 139.196.170.69Connecting to www.meetqy.com (www.meetqy.com)|139.196.170.69|:443... connected.HTTP request sent, awaiting response... 200 OKLength: 22369 (22K) [text/html]Saving to: 'index.html'index.html 100%[==================================>] 21.84K 141KB/s in 0.2s

dongshan8 2019-12-02 00:01:41 0 浏览量 回答数 0

问题

求问关于angularjs1.2.9的minErr()报错的问题

a123456678 2019-12-01 20:22:21 1313 浏览量 回答数 1

问题

jsp是否过时

杨冬芳 2019-12-01 20:06:49 1616 浏览量 回答数 2

问题

JavaScript,不知道能做什么或不懂怎么做出个东西来,怎么办?

杨冬芳 2019-12-01 19:48:21 945 浏览量 回答数 1

问题

浅学了JavaScript,却不知道能做什么或不懂怎么做出个东西来,怎么办

杨冬芳 2019-12-01 20:07:22 937 浏览量 回答数 2

回答

$(".three3 :eq(i)").val(txt[i]);改为 $(".three3 :eq("+i+")").val(txt[i]); `================================ <html> <head> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script> $(function () { var txt = ["1", "2", "3", "4", "5"]; $("#1").click(function () { for (i = 0; i < txt.length; i++) { var tr = ' <div><input type="text" class="three3" value="ssss"/></div>' //循环创建按钮 $("#2").append(tr); //赋值 $(".three3 :eq("+i+")").val(txt[i]); } }) }); </script> </head> <body> <button type="button" id="1">Click</button> <button type="button" id="3">button</button> <div id="2"></div> </body> </html>

小旋风柴进 2019-12-02 02:22:41 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档 CDONTS支持如下的方法:<%Set Mymail = CreateObject("CDONTS.NewMail")Mymail.From = *** '信件发送者信箱Mymail.To = *** ‘信件接收者信箱Mymail.CC = *** '抄送Mymail.BCC = *** ’密件发送Mymail.Subject = *** ‘信件主题Mymail.Body = *** ’信件正文'设置优先级,0-不重要,1-一般,2-重要。Mymail.Importance = 2Mymail.SendSet Mymail = Nothing%>注释:***字符串可能是写进去的,也可能是取自表单,使用Request方法。如何使用CDONTS组件发基于HTML的信件?<%Set MyMail2 = CreateObject("CDONTS.NewMail")HTML = ""HTML = HTML & ""HTML = HTML & "Sending CDONTS Email Using HTML"HTML = HTML & ""HTML = HTML & ""HTML = HTML & ""HTML = HTML & "This is a test mail in html"HTML = HTML & "Mail content here ..."HTML = HTML & ""HTML = HTML & ""MyMail2.From= "test@hichina.com"MyMail2.To=test@net.cnMyMail2.Subject="Test mail in HTML"MyMail2.BodyFormat=0MyMail2.MailFormat=0MyMail2.Body = HTMLMyMail2.Sendset MyMail2=nothing%>总之,用标准的HTML写就是了。如何使用CDONTS组件发含附件的信件?<%Set MyMail3 = CreateObject("CDONTS.NewMail")MyMail3.From= "test@hichina.com"MyMail3.To= "test@net.cn"MyMail3.Cc="test@com.cn"MyMail3.Subject="This is a Test"MyCDONTSMail3.AttachFile Server.MapPath("C:\inetpub\wwwroot\somedirectory\anyfile.txt")MyBody2 = "Thank you!" & vbCrLfMyBody2 = MyBody2 & "Your information will be send to me!" & vbCrLfMyBody2 = MyBody2 & "Welcome in http://service.hichina.com !"MyMail3.Body= MyBody2MyMail3.Sendset MyMail3=nothing%>如问题还未解决,请联系售后技术支持。

2019-12-01 23:21:57 0 浏览量 回答数 0

回答

详细解答可以参考官方帮助文档 问题描述:使用OSS的javasdk的contentMD5出现log4j警告,log4j:WARN No appenders could be found for logger (org.apache.http.impl.conn.PoolingClientConnectionManager).log4j:WARN Please initialize the log4j system properly.log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.:解决方法:这个log4j是Apache的服务,可以参考如下方法。 在工程的src文件夹下面新建file名为log4j.properties内容如下: # Configure logging for testing: optionally with log filelog4j.rootLogger=WARN, stdout# log4j.rootLogger=WARN, stdout, logfile log4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.layout=org.apache.log4j.PatternLayoutlog4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n log4j.appender.logfile=org.apache.log4j.FileAppenderlog4j.appender.logfile.File=target/spring.loglog4j.appender.logfile.layout=org.apache.log4j.PatternLayoutlog4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n ===============================加入了这个配置文件后,再次运行程序上面的警告就会消失。如果问题还未能解决,请联系售后技术支持。 

2019-12-01 23:31:24 0 浏览量 回答数 0

问题

请问此html dom 的checkbox中checkAll(this.checked)该如何理解?

小旋风柴进 2019-12-01 19:22:17 1098 浏览量 回答数 1

问题

想在html里面加个判断,该怎么加?

爵霸 2019-12-01 20:04:20 1299 浏览量 回答数 1

问题

php文件无法得到POST过来的数据

杨冬芳 2019-12-01 19:57:58 1012 浏览量 回答数 1

问题

php文件无法得到POST过来的数据,为什么

落地花开啦 2019-12-01 19:57:59 1093 浏览量 回答数 1

回答

<!DOCTYPE html> <html> <head> <title>Number Entry</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="script/jquery-2.1.3.min.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#submitform').click(function(){ //var option1Selected=$('input[name=option1]').val(); //var option2Selected=$('input[name=option2]').val(); //var option3Selected=$('input[name=option3]').val(); $('input[type=radio]:checked').each(function(index,item){ console.log($(item).val()); }); }); }); </script> </head> <body> <div class="page-header"> <h1>霍兰德职业测试</h1> </div> <form id="radioform" onsubmit="return false;"> <p>1.当我投入到创造性工作时,经常会忘却一切。</p> <label class="radio-inline"> <input type="radio" name="option1" id="chioseradio11" value="-0.8"> 非常不符合 </label> <label class="radio-inline"> <input type="radio" name="option1" id="chioseradio12" value="0.2"> 不符合 </label> <label class="radio-inline"> <input type="radio" name="option1" id="chioseradio13" value="1.2"> 说不清 </label> <label class="radio-inline"> <input type="radio" name="option1" id="chioseradio14" value="2.2"> 基本符合 </label> <label class="radio-inline"> <input type="radio" name="option1" id="chioseradio15" value="3.2"> 非常符合 </label> <p>2.我喜欢观察各种动植物的生长和发育过程。</p> <label class="radio-inline"> <input type="radio" name="option2" id="chioseradio21" value="-0.8"> 非常不符合 </label> <label class="radio-inline"> <input type="radio" name="option2" id="chioseradio22" value="0.2"> 不符合 </label> <label class="radio-inline"> <input type="radio" name="option2" id="chioseradio23" value="1.2"> 说不清 </label> <label class="radio-inline"> <input type="radio" name="option2" id="chioseradio24" value="2.2"> 基本符合 </label> <label class="radio-inline"> <input type="radio" name="option2" id="chioseradio25" value="3.2"> 非常符合 </label> <p>3.我喜欢读悬疑小说中的精彩曲折的推理过程</p> <label class="radio-inline"> <input type="radio" name="option3" id="chioseradio31" value="-0.8"> 非常不符合 </label> <label class="radio-inline"> <input type="radio" name="option3" id="chioseradio32" value="0.2"> 不符合 </label> <label class="radio-inline"> <input type="radio" name="option3" id="chioseradio33" value="1.2"> 说不清 </label> <label class="radio-inline"> <input type="radio" name="option3" id="chioseradio34" value="2.2"> 基本符合 </label> <label class="radio-inline"> <input type="radio" name="option3" id="chioseradio35" value="3.2"> 非常符合 </label> <button id="submitform">提交</button> </form> </body> </html>

小旋风柴进 2019-12-02 02:23:07 0 浏览量 回答数 0

问题

有关jquery中ajax的缓存问题

云栖技术 2019-12-01 19:26:06 845 浏览量 回答数 1

回答

实现步骤:在页面上设置时间; 将时间转换为Unix Cron Expression;将转换后的时间规则表达式记录到数据库中(也可以写入xml文件中,这里是项目需要记录入数据库中);从数据库中得到相应的时间规则表达式;更新您的任务触发器的时间设置;RESCHEDULE THE JOB。; - ) 具体实现细节: 1) 在页面上设置时间根据具体的业务需求,设置时间规则,下面以某一项目为例,需要 按每月、每周、自定义分为三种规则。 1 < tr > 2 < th > 执行这个任务 th > 3 < td style ="font-weight:bold;" > 4 < html:radio property ="everyWhat" styleClass ="InputBorderNone" value ="monthly" onclick ="changeStatus(this.value)" > 每月 html:radio > 5 < html:radio property ="everyWhat" styleClass ="InputBorderNone" value ="weekly" onclick ="changeStatus(this.value)" > 每周 html:radio > 6 < html:radio property ="everyWhat" styleClass ="InputBorderNone" value ="userDefined" onclick ="changeStatus(this.value)" > 自定义 html:radio > 7 < html:hidden property ="jobName" value ="compare" /> 8 td > 9 tr > 10 每月则需要选择该月的第几个星期的星期几 1 < tr style ="display:" id ="whichWeek" > 2 < th > 选择第几个星期 th > 3 < td style ="font-weight:bold;" > 4 < html:select property ="week" > 5 < html:option value ="1" > 一 html:option > 6 < html:option value ="2" > 二 html:option > 7 < html:option value ="3" > 三 html:option > 8 < html:option value ="4" > 四 html:option > 9 html:select > 10 < html:select property ="dayOfMonth" > 11 < html:option value ="1" > 星期日 html:option > 12 < html:option value ="2" > 星期一 html:option > 13 < html:option value ="3" > 星期二 html:option > 14 < html:option value ="4" > 星期三 html:option > 15 < html:option value ="5" > 星期四 html:option > 16 < html:option value ="6" > 星期五 html:option > 17 < html:option value ="7" > 星期六 html:option > 18 html:select > 19 td > 20 tr > 21 每周则需要选择星期几 1 < tr style ="display:none" id ="whichDay" > 2 < th > 选择星期 th > 3 < td style ="font-weight:bold;" > 4 < html:select property ="dayOfWeek" > 5 < html:option value ="1" > 星期日 html:option > 6 < html:option value ="2" > 星期一 html:option > 7 < html:option value ="3" > 星期二 html:option > 8 < html:option value ="4" > 星期三 html:option > 9 < html:option value ="5" > 星期四 html:option > 10 < html:option value ="6" > 星期五 html:option > 11 < html:option value ="7" > 星期六 html:option > 12 html:select > 13 td > 14 tr > 15 自定义则选择具体的日期,如 2007-1-10 三种规则都需要设定时间点 1 < tr > 2 < th > 起始时间 th > 3 < td style ="font-weight:bold;" > 4 < html:select property ="timeType" styleId ="type" onchange ="changeStatus2(this.value)" > 5 < html:option value ="AM" > 上午 html:option > 6 < html:option value ="PM" > 下午 html:option > 7 html:select > 8 < html:select property ="hour" styleId ="amHours" > 9 < html:option value ="1" > 1 html:option > 10 < html:option value ="2" > 2 html:option > 11 < html:option value ="3" > 3 html:option > 12 < html:option value ="4" > 4 html:option > 13 < html:option value ="5" > 5 html:option > 14 < html:option value ="6" > 6 html:option > 15 < html:option value ="7" > 7 html:option > 16 < html:option value ="8" > 8 html:option > 17 < html:option value ="9" > 9 html:option > 18 < html:option value ="10" > 10 html:option > 19 < html:option value ="11" > 11 html:option > 20 < html:option value ="12" > 12 html:option > 21 html:select > 22 < html:select property ="hour" styleId ="pmHours" style ="display:none" > 23 < html:option value ="13" > 13 html:option > 24 < html:option value ="14" > 14 html:option > 25 < html:option value ="15" > 15 html:option > 26 < html:option value ="16" > 16 html:option > 27 < html:option value ="17" > 17 html:option > 28 < html:option value ="18" > 18 html:option > 29 < html:option value ="19" > 19 html:option > 30 < html:option value ="20" > 20 html:option > 31 < html:option value ="21" > 21 html:option > 32 < html:option value ="22" > 22 html:option > 33 < html:option value ="23" > 23 html:option > 34 < html:option value ="0" > 0 html:option > 35 html:select > 点36 < html:text property ="minute" name ="minute" style ="width:20px;" value ="0" onchange ="valTime(this.value)" /> 分37 < html:text property ="second" name ="second" style ="width:20px;" value ="0" onchange ="valTime(this.value)" /> 秒(0-59之间的整数)38 td > 39 tr > 40 我们的设置页面已经做好了,接下来就是将时间转换为Unix Cron Expression。 2) 将时间转换为Unix Cron Expression 需要ActionForm将页面表单数据映射到Action中,然后在Action中转换为cron expression: 1 SchedulerForm schedulerForm = (SchedulerForm) form; 2 String jobName = schedulerForm.getJobName(); 3 String cronExpression = "" ; 4 String[] commonNeeds = {schedulerForm.getSecond(), schedulerForm.getMinute(), schedulerForm.getHour()} ; 5 String[] monthlyNeeds = {schedulerForm.getWeek(), schedulerForm.getDayOfMonth()} ; 6 String weeklyNeeds = schedulerForm.getDayOfWeek(); 7 String userDefinedNeeds = schedulerForm.getDate(); 8 String everyWhat = schedulerForm.getEveryWhat(); 9 // 得到时间规则 10 cronExpression = CronExpConversion.getCronExpression(everyWhat, commonNeeds,11 monthlyNeeds, weeklyNeeds, userDefinedNeeds);12 我定义了一个 规则类来处理转换规则(写得不是很好 能用就行 嘿嘿) 1 2 /** 3 * 页面设置转为UNIX cron expressions 转换类 4 * CronExpConversion 5 */ 6 public class CronExpConversion { 7 8 /** 9 * 页面设置转为UNIX cron expressions 转换算法10 * @param everyWhat11 * @param commonNeeds 包括 second minute hour12 * @param monthlyNeeds 包括 第几个星期 星期几13 * @param weeklyNeeds 包括 星期几14 * @param userDefinedNeeds 包括具体时间点15 * @return cron expression16 */ 17 public static String convertDateToCronExp(String everyWhat,18 String[] commonNeeds, String[] monthlyNeeds, String weeklyNeeds,19 String userDefinedNeeds) {20 String cronEx = "" ;21 String commons = commonNeeds[ 0 ] + " " + commonNeeds[ 1 ] + " " 22 + commonNeeds[ 2 ] + " " ;23 String dayOfWeek = "" ;24 if ( " monthly " .equals(everyWhat)) {25 // eg.: 6#3 (day 6 = Friday and "#3" = the 3rd one in the26 // month) 27 dayOfWeek = monthlyNeeds[ 1 ]28 + CronExRelated.specialCharacters29 .get(CronExRelated._THENTH) + monthlyNeeds[ 0 ];30 cronEx = (commons31 + CronExRelated.specialCharacters.get(CronExRelated._ANY)32 + " " 33 + CronExRelated.specialCharacters.get(CronExRelated._EVERY)34 + " " + dayOfWeek + " " ).trim();35 } else if ( " weekly " .equals(everyWhat)) {36 dayOfWeek = weeklyNeeds; // 1 37 cronEx = (commons38 + CronExRelated.specialCharacters.get(CronExRelated._ANY)39 + " " 40 + CronExRelated.specialCharacters.get(CronExRelated._EVERY)41 + " " + dayOfWeek + " " ).trim();42 } else if ( " userDefined " .equals(everyWhat)) {43 String dayOfMonth = userDefinedNeeds.split( " - " )[ 2 ];44 if (dayOfMonth.startsWith( " 0 " )) {45 dayOfMonth = dayOfMonth.replaceFirst( " 0 " , "" );46 } 47 String month = userDefinedNeeds.split( " - " )[ 1 ];48 if (month.startsWith( " 0 " )) {49 month = month.replaceFirst( " 0 " , "" );50 } 51 String year = userDefinedNeeds.split( " - " )[ 0 ];52 // FIXME 暂时不加年份 Quartz报错 53 /* cronEx = (commons + dayOfMonth + " " + month + " "54 + CronExRelated.specialCharacters.get(CronExRelated._ANY)55 + " " + year).trim(); */ 56 cronEx = (commons + dayOfMonth + " " + month + " " 57 + CronExRelated.specialCharacters.get(CronExRelated._ANY)58 + " " ).trim();59 } 60 return cronEx;61 } 62 } 63 这样就将页面的时间设置转为了Cron Expression。 3) 记录时间规则 我将时间规则存入数据库中,目的是为了生成历史日志,也可以存入XML文件中。当然您也可以省略此步,直接将转换后的规则放入相应的Quartz trigger中。 4) 更新任务触发器的时间设置 到了关键的一步了,也是最简单的一步,一个方法就可以实现了。首先,我们需要通过trigger的名称得到一个CronTriggerBean;其次,通过trigger的setCronExpression(String cronExp)方法将新的表达式注入;最后,RESCHEDULE THE JOB,OK! 1 /** 2 * 自定义定时器调度时间 3 * @param triggerName 触发器名称 4 * @throws Exception 5 */ 6 public void updateNotificationInterval(String triggerName, String triggerId) 7 throws SchedulerException, ParseException { 8 // 得到trigger 9 CronTriggerBean trigger = (CronTriggerBean) scheduler.getTrigger(10 triggerName, Scheduler.DEFAULT_GROUP);11 // 得到cron expression 12 String cronExpression = schedulerDAO.getCronExpression(triggerId);13 // 设置trigger的时间规则 14 trigger.setCronExpression(cronExpression);15 // 重置job 16 scheduler.rescheduleJob(triggerName, Scheduler.DEFAULT_GROUP, trigger);17 } 18 至此,目的达到了,快乐的看着您的任务在您自定义的时间下快乐的执行,您是否也想像'Happy Feet'中那只快乐的企鹅一样,Show段踢踏呢 ; - D PS:忘了说我的Quartz任务是怎么配置的了,罪过,罪过。 < bean id ="compareJob" class ="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" > < property name ="targetObject" ref ="compareService" /> < property name ="targetMethod" value ="compare" /> < property name ="concurrent" value ="false" /> </ bean > < bean id ="compareTrigger" class ="org.springframework.scheduling.quartz.CronTriggerBean" > < property name ="jobDetail" ref ="compareJob" /> < property name ="cronExpression" > < value > 0 39 16 20 * ? </ value > </ property > </ bean > < bean id ="schedulerFactory" class ="org.springframework.scheduling.quartz.SchedulerFactoryBean" > < property name ="triggers" > < list > < ref local ="compareTrigger" /> </ list > </ property > </ bean > 实现步骤:在页面上设置时间; 将时间转换为Unix Cron Expression;将转换后的时间规则表达式记录到数据库中(也可以写入xml文件中,这里是项目需要记录入数据库中);从数据库中得到相应的时间规则表达式;更新您的任务触发器的时间设置;RESCHEDULE THE JOB。; - ) 具体实现细节:1) 在页面上设置时间 根据具体的业务需求,设置时间规则,下面以某一项目为例,需要 按每月、每周、自定义分为三种规则。 < tr > < th > 执行这个任务 </ th > < td style ="font-weight:bold;" > < html:radio property ="everyWhat" styleClass ="InputBorderNone" value ="monthly" onclick ="changeStatus(this.value)" > 每月 </ html:radio > < html:radio property ="everyWhat" styleClass ="InputBorderNone" value ="weekly" onclick ="changeStatus(this.value)" > 每周 </ html:radio > < html:radio property ="everyWhat" styleClass ="InputBorderNone" value ="userDefined" onclick ="changeStatus(this.value)" > 自定义 </ html:radio > < html:hidden property ="jobName" value ="compare" /> </ td > </ tr > 每月则需要选择该月的第几个星期的星期几 < tr style ="display:" id ="whichWeek" > < th > 选择第几个星期 </ th > < td style ="font-weight:bold;" > < html:select property ="week" > < html:option value ="1" > 一 </ html:option > < html:option value ="2" > 二 </ html:option > < html:option value ="3" > 三 </ html:option > < html:option value ="4" > 四 </ html:option > </ html:select > < html:select property ="dayOfMonth" > < html:option value ="1" > 星期日 </ html:option > < html:option value ="2" > 星期一 </ html:option > < html:option value ="3" > 星期二 </ html:option > < html:option value ="4" > 星期三 </ html:option > < html:option value ="5" > 星期四 </ html:option > < html:option value ="6" > 星期五 </ html:option > < html:option value ="7" > 星期六 </ html:option > </ html:select > </ td > </ tr > 每周则需要选择星期几 < tr style ="display:none" id ="whichDay" > < th > 选择星期 </ th > < td style ="font-weight:bold;" > < html:select property ="dayOfWeek" > < html:option value ="1" > 星期日 </ html:option > < html:option value ="2" > 星期一 </ html:option > < html:option value ="3" > 星期二 </ html:option > < html:option value ="4" > 星期三 </ html:option > < html:option value ="5" > 星期四 </ html:option > < html:option value ="6" > 星期五 </ html:option > < html:option value ="7" > 星期六 </ html:option > </ html:select > </ td > </ tr > 自定义则选择具体的日期,如 2007-1-10 三种规则都需要设定时间点 < tr > < th > 起始时间 </ th > < td style ="font-weight:bold;" > < html:select property ="timeType" styleId ="type" onchange ="changeStatus2(this.value)" > < html:option value ="AM" > 上午 </ html:option > < html:option value ="PM" > 下午 </ html:option > </ html:select > < html:select property ="hour" styleId ="amHours" > < html:option value ="1" > 1 </ html:option > < html:option value ="2" > 2 </ html:option > < html:option value ="3" > 3 </ html:option > < html:option value ="4" > 4 </ html:option > < html:option value ="5" > 5 </ html:option > < html:option value ="6" > 6 </ html:option > < html:option value ="7" > 7 </ html:option > < html:option value ="8" > 8 </ html:option > < html:option value ="9" > 9 </ html:option > < html:option value ="10" > 10 </ html:option > < html:option value ="11" > 11 </ html:option > < html:option value ="12" > 12 </ html:option > </ html:select > < html:select property ="hour" styleId ="pmHours" style ="display:none" > < html:option value ="13" > 13 </ html:option > < html:option value ="14" > 14 </ html:option > < html:option value ="15" > 15 </ html:option > < html:option value ="16" > 16 </ html:option > < html:option value ="17" > 17 </ html:option > < html:option value ="18" > 18 </ html:option > < html:option value ="19" > 19 </ html:option > < html:option value ="20" > 20 </ html:option > < html:option value ="21" > 21 </ html:option > < html:option value ="22" > 22 </ html:option > < html:option value ="23" > 23 </ html:option > < html:option value ="0" > 0 </ html:option > </ html:select > 点 < html:text property ="minute" name ="minute" style ="width:20px;" value ="0" onchange ="valTime(this.value)" /> 分 < html:text property ="second" name ="second" style ="width:20px;" value ="0" onchange ="valTime(this.value)" /> 秒(0-59之间的整数) </ td > </ tr > 我们的设置页面已经做好了,接下来就是将时间转换为Unix Cron Expression。2) 将时间转换为Unix Cron Expression需要ActionForm将页面表单数据映射到Action中,然后在Action中转换为cron expression: SchedulerForm schedulerForm = (SchedulerForm) form; String jobName = schedulerForm.getJobName(); String cronExpression = "" ; String[] commonNeeds = {schedulerForm.getSecond(), schedulerForm.getMinute(), schedulerForm.getHour()} ; String[] monthlyNeeds = {schedulerForm.getWeek(), schedulerForm.getDayOfMonth()} ; String weeklyNeeds = schedulerForm.getDayOfWeek(); String userDefinedNeeds = schedulerForm.getDate(); String everyWhat = schedulerForm.getEveryWhat(); // 得到时间规则 cronExpression = CronExpConversion.getCronExpression(everyWhat, commonNeeds, monthlyNeeds, weeklyNeeds, userDefinedNeeds); 我定义了一个 规则类来处理转换规则(写得不是很好 能用就行 嘿嘿) /** * 页面设置转为UNIX cron expressions 转换类 * CronExpConversion */ public class CronExpConversion { /** * 页面设置转为UNIX cron expressions 转换算法 * @param everyWhat * @param commonNeeds 包括 second minute hour * @param monthlyNeeds 包括 第几个星期 星期几 * @param weeklyNeeds 包括 星期几 * @param userDefinedNeeds 包括具体时间点 * @return cron expression */ public static String convertDateToCronExp(String everyWhat, String[] commonNeeds, String[] monthlyNeeds, String weeklyNeeds, String userDefinedNeeds) { String cronEx = "" ; String commons = commonNeeds[ 0 ] + " " + commonNeeds[ 1 ] + " " + commonNeeds[ 2 ] + " " ; String dayOfWeek = "" ; if ( " monthly " .equals(everyWhat)) { // eg.: 6#3 (day 6 = Friday and "#3" = the 3rd one in the // month) dayOfWeek = monthlyNeeds[ 1 ] + CronExRelated.specialCharacters .get(CronExRelated._THENTH) + monthlyNeeds[ 0 ]; cronEx = (commons + CronExRelated.specialCharacters.get(CronExRelated._ANY) + " " + CronExRelated.specialCharacters.get(CronExRelated._EVERY) + " " + dayOfWeek + " " ).trim(); } else if ( " weekly " .equals(everyWhat)) { dayOfWeek = weeklyNeeds; // 1 cronEx = (commons + CronExRelated.specialCharacters.get(CronExRelated._ANY) + " " + CronExRelated.specialCharacters.get(CronExRelated._EVERY) + " " + dayOfWeek + " " ).trim(); } else if ( " userDefined " .equals(everyWhat)) { String dayOfMonth = userDefinedNeeds.split( " - " )[ 2 ]; if (dayOfMonth.startsWith( " 0 " )) { dayOfMonth = dayOfMonth.replaceFirst( " 0 " , "" ); } String month = userDefinedNeeds.split( " - " )[ 1 ]; if (month.startsWith( " 0 " )) { month = month.replaceFirst( " 0 " , "" ); } String year = userDefinedNeeds.split( " - " )[ 0 ]; // FIXME 暂时不加年份 Quartz报错 /* cronEx = (commons + dayOfMonth + " " + month + " " + CronExRelated.specialCharacters.get(CronExRelated._ANY) + " " + year).trim(); */ cronEx = (commons + dayOfMonth + " " + month + " " + CronExRelated.specialCharacters.get(CronExRelated._ANY) + " " ).trim(); } return cronEx; } } 这样就将页面的时间设置转为了Cron Expression。 3) 记录时间规则 我将时间规则存入数据库中,目的是为了生成历史日志,也可以存入XML文件中。当然您也可以省略此步,直接将转换后的规则放入相应的Quartz trigger中。4) 更新任务触发器的时间设置到了关键的一步了,也是最简单的一步,一个方法就可以实现了。首先,我们需要通过trigger的名称得到一个CronTriggerBean;其次,通过trigger的setCronExpression(String cronExp)方法将新的表达式注入;最后,RESCHEDULE THE JOB,OK! /** * 自定义定时器调度时间 * @param triggerName 触发器名称 * @throws Exception */ public void updateNotificationInterval(String triggerName, String triggerId) throws SchedulerException, ParseException { // 得到trigger CronTriggerBean trigger = (CronTriggerBean) scheduler.getTrigger( triggerName, Scheduler.DEFAULT_GROUP); // 得到cron expression String cronExpression = schedulerDAO.getCronExpression(triggerId); // 设置trigger的时间规则 trigger.setCronExpression(cronExpression); // 重置job scheduler.rescheduleJob(triggerName, Scheduler.DEFAULT_GROUP, trigger); } 至此,目的达到了,快乐的看着您的任务在您自定义的时间下快乐的执行,您是否也想像'Happy Feet'中那只快乐的企鹅一样,Show段踢踏呢 ; - D PS:忘了说我的Quartz任务是怎么配置的了,罪过,罪过。 < bean id ="compareJob" class ="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" > < property name ="targetObject" ref ="compareService" /> < property name ="targetMethod" value ="compare" /> < property name ="concurrent" value ="false" /> </ bean > < bean id ="compareTrigger" class ="org.springframework.scheduling.quartz.CronTriggerBean" > < property name ="jobDetail" ref ="compareJob" /> < property name ="cronExpression" > < value > 0 39 16 20 * ? </ value > </ property > </ bean > < bean id ="schedulerFactory" class ="org.springframework.scheduling.quartz.SchedulerFactoryBean" > < property name ="triggers" > < list > < ref local ="compareTrigger" /> </ list > </ property > </ bean >

小旋风柴进 2019-12-02 01:57:51 0 浏览量 回答数 0

问题

用JS改滚动条数值的小问题,

小旋风柴进 2019-12-01 20:18:59 750 浏览量 回答数 1

回答

测试例子,100以上没问题 <!doctype html> <html> <body> <script> var slmin=22, slmax=38, glmin=12, glmax=16; var glbiaozhunjia = 20,glbiaozhun=5,sljiagebodong=1; var slbiaozhunjia = 60,slbiaozhun=2,gljiagebodong=1; function k(){ var shuifen = document.getElementById('sf').value; if(parseFloat(shuifen)>=parseFloat(slmin)&&parseFloat(shuifen)<=parseFloat(slmax)){ danjia =slbiaozhunjia- (shuifen-slbiaozhun)*sljiagebodong; document.getElementById("ruKu.danJia").value=danjia.toFixed(2); } else if(parseFloat(shuifen)>=parseFloat(glmin)&&shuifen<=glmax ){ danjia =glbiaozhunjia- (shuifen-glbiaozhun)*gljiagebodong; document.getElementById("ruKu.danJia").value=danjia.toFixed(2); } else{alert("水分在"+glmin+"—"+glmax+"或"+slmin+"—"+slmax+"之间")} } </script> <input id="sf" type="text" value="0"/> <input id="input1" type="button" value="校验" onclick='k()'/> <input id="ruKu.danJia" type="text" value="0"/> </body> </html>

小旋风柴进 2019-12-02 02:14:19 0 浏览量 回答数 0

问题

用JS改滚动条数值的小问题,谢谢了

小旋风柴进 2019-12-01 20:25:27 895 浏览量 回答数 1

回答

将你的代码简单改造了一下,首先将下面代码保存在一个叫做drag.js的文件中这个简单封装的库基本上就是你的代码稍微修改而来,当然改进的空间还很大,运用了事件委托的方式添加事件。 ; (function(ROOT, undefined) { var Drag = function(parent) { return new Drag.fn.init(parent); } Drag.prototype = Drag.fn = { constructor: Drag, init: function(parent) { if (typeof parent === 'object') { this.parent = parent; } else if (typeof parent === 'string' && parent.indexOf('#') === 0) { var id = parent.slice(1); this.parent = document.getElementById(id); } else if (typeof parent === 'string' && parent.indexOf('.') === 0) { var cls = parent.slice(1); this.parent = document.getElementByClassName(cls)[0]; }; }, changeChild: function() { var ul = this.parent; ul.onmousedown = function(ev) { var ev = ev || event, obj = ev.target || ev.srcElement, liTop = obj.offsetTop, liHeight = obj.offsetHeight; blank = document.createElement('li'); ul.insertBefore(blank,obj.nextSibling); blank.style.visibility = 'hidden'; obj.style.left = obj.offsetLeft + 'px'; obj.style.top = obj.offsetTop + 'px'; obj.style.position = "absolute"; obj.style.zIndex = '999'; obj.style.background = '#e0543e'; var disX = ev.clientX - obj.offsetLeft; var disY = ev.clientY - obj.offsetTop; document.onmousemove = function(ev) { var ev = ev || event, L = ev.clientX - disX, T = ev.clientY - disY, n = Math.round((T-liTop)/liHeight + 1); ul.insertBefore(blank,ul.children[n]); obj.style.left = L + 'px'; obj.style.top = T + 'px'; }; document.onmouseup = function() { ul.insertBefore(obj,blank); obj.removeAttribute('style'); ul.removeChild(blank); document.onmousemove = null; }; return false; }; }, } Drag.fn.init.prototype = Drag.fn; ROOT.Drag = ROOT.__ = Drag; })(window); 因为事件是添加到父级ul的上面,因此,调用的时候,只需将ul的id传入即可,使用方式如下 __('#ul1').changeChild(); 你也可以用如下完整代码来查看效果 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>task2_5</title> <style> * { padding: 0; margin: 0; list-style: none; } #wrap { margin: 100px; auto; width: 980px; } ul { position: relative; height: 310px; float: left; margin-left:200px; border: 1px solid #10a399; } li { width: 200px; height: 30px; background: #c1f3f3; border-bottom: 1px solid #10a399; text-align: center; color: #999; line-height: 30px; } </style> </head> <body> <div id="wrap"> <ul id="ul1"> <li id="move">1</li> <li class="move">2</li> <li class="move">3</li> <li class="move">4</li> <li class="move">5</li> </ul> </div> </body> <script type="text/javascript"> /** * 封装部分,你可以将该部分直接放在一个单独的js文件中,然后引用即可 */ ; (function(ROOT, undefined) { var Drag = function(parent) { return new Drag.fn.init(parent); } Drag.prototype = Drag.fn = { constructor: Drag, init: function(parent) { if (typeof parent === 'object') { this.parent = parent; } else if (typeof parent === 'string' && parent.indexOf('#') === 0) { var id = parent.slice(1); this.parent = document.getElementById(id); } else if (typeof parent === 'string' && parent.indexOf('.') === 0) { var cls = parent.slice(1); this.parent = document.getElementByClassName(cls)[0]; }; }, changeChild: function() { var ul = this.parent; ul.onmousedown = function(ev) { var ev = ev || event, obj = ev.target || ev.srcElement, liTop = obj.offsetTop, liHeight = obj.offsetHeight; blank = document.createElement('li'); ul.insertBefore(blank,obj.nextSibling); blank.style.visibility = 'hidden'; obj.style.left = obj.offsetLeft + 'px'; obj.style.top = obj.offsetTop + 'px'; obj.style.position = "absolute"; obj.style.zIndex = '999'; obj.style.background = '#e0543e'; var disX = ev.clientX - obj.offsetLeft; var disY = ev.clientY - obj.offsetTop; document.onmousemove = function(ev) { var ev = ev || event, L = ev.clientX - disX, T = ev.clientY - disY, n = Math.round((T-liTop)/liHeight + 1); ul.insertBefore(blank,ul.children[n]); obj.style.left = L + 'px'; obj.style.top = T + 'px'; }; document.onmouseup = function() { ul.insertBefore(obj,blank); obj.removeAttribute('style'); ul.removeChild(blank); document.onmousemove = null; }; return false; }; }, } Drag.fn.init.prototype = Drag.fn; ROOT.Drag = ROOT.__ = Drag; })(window); __('#ul1').changeChild(); </script> </html>

杨冬芳 2019-12-02 02:36:16 0 浏览量 回答数 0

回答

一 对于Tomcat5.0以后的版本是支持对输出内容进行压缩的使用的是gzip压缩格式下 面是tomcat5.5.20 中的$tomcat_home$/conf/server.xml的原内容 < Connector port ="80" maxHttpHeaderSize ="8192" maxThreads ="150" minSpareThreads ="25" maxSpareThreads ="75" enableLookups ="false" redirectPort ="8443" acceptCount ="100" connectionTimeout ="20000" disableUploadTimeout ="true" URIEncoding ="utf-8" /> to 0 --> compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml"-->从上面的第 8行内容可以看出,要使用gzip压缩功能,你可以在Connector实例中加上如下 属性即可1) compression="on" 打开压缩功能2) compressionMinSize="2048" 启用压缩的输出内容大小,这里面默认为2KB3) noCompressionUserAgents="gozilla, traviata" 对于以下的浏览器,不启用压缩 4) compressableMimeType="text/html,text/xml" 压缩类型(默认为text/html,text/xml,text/plain)我 这里的配置内容为: maxThreads="150" minSpareThreads="25" maxSpareThreads="75"enableLookups="false" redirectPort="8443" acceptCount="100"connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="utf-8"compression="on"compressionMinSize="2048"noCompressionUserAgents="gozilla, traviata"compressableMimeType="text/html,text/xml,text/javascript,text/css,text/plain" />to 0 --> compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml"-->一旦启用了这个压缩功能后,我们怎么来测试压缩是否有效呢?首先Tomcat是根据浏览器请求头中的accept-encoding来判断浏览器是否支持 压缩功能,如果这个值包含有gzip,就表明浏览器支持gzip压缩内容的浏览,所以我们可以用httpclient来写一个这样的简单测试程序 import org.apache.commons.httpclient.HttpClient;import org.apache.commons.httpclient.methods.GetMethod; public class HttpTester { public static void main(String[] args) throws Exception{HttpClient http = new HttpClient();GetMethod get = new GetMethod("http://www.dlog.cn/js/prototype.js");try{get.addRequestHeader("accept-encoding", "gzip,deflate");get.addRequestHeader("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Alexa Toolbar; Maxthon 2.0)");int er = http.executeMethod(get);if(er==200){System.out.println(get.getResponseContentLength());String html = get.getResponseBodyAsString();System.out.println(html);System.out.println(html.getBytes().length);}}finally{get.releaseConnection();}} }执行这个测试程序,看看它所输出的是什么内容,如果输出的是一些 乱码,以及打印内容的长度远小于实际的长度,那么恭喜你,你的配置生效了,你会发现你网站的浏览速度比以前快多了。

我的中国 2019-12-02 01:33:32 0 浏览量 回答数 0

回答

js动态加载时分了多种情况,而我只改了其中一种情况,应该把所有情况都改掉,如下: '{@if it.detailTypeString == "OnlineCourse"}', '<td width="35%" class="learning-tasks">', '<a title="${it.objectName}" class="aCss " style="color: #2073BF;width:100px" href="../../course/page/course-detail.html?id=${it.object_id}">${it.objectName}</a>', '</td>', '{@/if}', '{@if it.detailTypeString == "OfflineCourse"}', '<td width="35%" class="learning-tasks">', '<a title="${it.objectName}" class="aCss" style="color: #2073BF;width:100px" href="../../course/page/offline-detail.html?id=${it.object_id}" >${it.objectName}</a>', '</td>', '{@/if}', '{@if it.detailTypeString == "OnlineExam"}', '{@if it.testing.conductStatus ==="进行中"}', '<td width="35%" class="learning-tasks">', '<a title="${it.objectName}" class="aCss" style="color: #2073BF;width:100px" href="../../exam/page/exam-proceed-detail.html?id=${it.object_id}">${it.objectName}</a>', '</td>', '{@/if}', '{@if it.testing.conductStatus !="进行中"}', '<td width="35%" class="learning-tasks">', '<a title="${it.objectName}" class="aCss" style="color: #2073BF;width:100px" href="../../exam/page/exam-history-detail.html

杨冬芳 2019-12-02 02:40:55 0 浏览量 回答数 0

回答

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Page : A <script type="text/javascript" src="script.js"></script> <script type="text/javascript"> <!-- window.onload = function(){ document.getElementById("btn").onclick = function(){ var id = document.getElementById("id"); var favs = document.getElementsByName("fav"); var title = document.createElement("h1"); title.innerHTML = "Page : B"; var hi = document.createElement("h1"); hi.innerHTML = "HI : " + id.value; var table = document.createElement("table"); table.border = 1; for (var i = 0 ; i < favs.length ; i++) { var tr = document.createElement("tr"); var td = document.createElement("td"); td.innerHTML = "Your Fav : " + favs[i].value; tr.appendChild(td); table.appendChild(tr); } var html = ""; html += title.outerHTML; html += hi.outerHTML; html += table.outerHTML; var pageB = window.open("about:blank","pageB",""); pageB.document.write(html); pageB.document.close(); }; }; //--> </script> <link rel="stylesheet" href="style.css" type="text/css" /> <style type="text/css" title=""> </style> </head> <body> <h1>Page : A</h1> <div> Your ID : <input type="text" id="id" /><br /> Your Fav : <ul> <li><input type="checkbox" name="fav" value="option1" />Readding</li> <li><input type="checkbox" name="fav" value="option2" />Shopping</li> <li><input type="checkbox" name="fav" value="option3" />SNS</li> <li><input type="checkbox" name="fav" value="option4" />...</li> </ul> <button type="button" id="btn">Send</button> </div> </body>

小旋风柴进 2019-12-02 02:12:08 0 浏览量 回答数 0

问题

,登录页面设定验证码和密码确认之后,在表单内提交前校验完全没响应

小旋风柴进 2019-12-01 20:27:54 1162 浏览量 回答数 1

问题

value="true" 的checkbox为什么不能选中

小旋风柴进 2019-12-01 20:18:22 1050 浏览量 回答数 1

问题

问一个input标签的focus事件问 题

杨冬芳 2019-12-01 19:49:24 880 浏览量 回答数 1
阿里云大学 云服务器ECS com域名 网站域名whois查询 开发者平台 小程序定制 小程序开发 国内短信套餐包 开发者技术与产品 云数据库 图像识别 开发者问答 阿里云建站 阿里云备案 云市场 万网 阿里云帮助文档 免费套餐 开发者工具 SQL审核 小程序开发制作 视频内容分析 企业网站制作 视频集锦 代理记账服务 2020阿里巴巴研发效能峰会 企业建站模板 云效成长地图 高端建站 人工智能 阿里云云栖号 云栖号案例 云栖号直播