摘要: javascript直接写document,for-in用来枚举,如下图:<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script language="Javascript" type="text/javascript" > for (var propName in window) { document.write(propName); docum 阅读全文
posted @ 2013-05-07 21:20 roytanlu 阅读(191) 评论(0) 推荐(0) 编辑
摘要: do-while和while的区别在于do-while最少会执行一次好吗。先看do-while:<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script language="Javascript" type="text/javascript" > var i=10; do{ i+=2 }while (i<10); alert(i);</ 阅读全文
posted @ 2013-05-07 21:10 roytanlu 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 最近在看javascript,就写了一段简单的网页代码,方便自己看,如下图:<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script language="Javascript" type="text/javascript" > var num=14*2; {alert ("14*2="+num); }</script> 阅读全文
posted @ 2013-05-05 15:15 roytanlu 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 作为工作中经常遇到win7和ubuntu两个系统的人,如何在ubuntu下仍然方便的修改hosts?见下图:在终端输入:sudo gedit /etc/hosts在唤醒的文本编辑器中将IP地址和域名粘帖保存即可。win7路径见截图,大家注意win7需要将hosts拷出来,用记事本打开后再粘贴回去 阅读全文
posted @ 2013-01-26 12:49 roytanlu 阅读(198) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2013-01-04 11:52 roytanlu 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2012-10-02 20:43 roytanlu 阅读(324) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication6{ class Program { static void Main(string[] args) { //输入x,计算关于x的一元多次方程的值 double x, y; Console.Write("x="); x = Convert.ToDoub... 阅读全文
posted @ 2012-09-15 10:24 roytanlu 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace datetoweekend 7 { 8 class Program 9 {10 static void Main(string[] args)11 {12 Console.WriteLine("分别输入年、月、日程序告诉你那天是星期几");13 int y, m, d, w;14 ... 阅读全文
posted @ 2012-09-15 00:17 roytanlu 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace ConsoleApplication5 7 { 8 class Program 9 {10 static void Main(string[] args)11 {12 float i = 44.44f;//不能隐式地将 Double 类型转换为“float”类型;请使用“F”后缀创建此类型13 ... 阅读全文
posted @ 2012-09-13 00:59 roytanlu 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace ConsoleApplication4 7 { 8 class Program 9 {10 static void Main(string[] args)11 {12 //通过圆的半径求圆的面积13 double r, s;14 Console.WriteLi... 阅读全文
posted @ 2012-09-11 22:36 roytanlu 阅读(290) 评论(0) 推荐(0) 编辑