Entries Tagged as ''

FireFox不支持javascript中的document.all

有个javascript程序

在IE下跑的好好的

但是在ff(Firefox)下总是不行

后来发现是在javascript里用了document.all的缘故

哈哈写程序也是半把刀

那个程序也是不知从哪里cut过来后改吧改吧成的

很多语句都搞得不是很清楚

哪里知道document.all不是标准的javascript

又哪里知道firefox会不支持呢

不过还好

现在是知道了

而且还知道

在我的程序里

var a = document.all

可以用

var a = document.getElementsByTagName("*")

来代替

linux下crontab中的命令行中含有”%”的话前面一定得加转移符”\”

其实这跟Linux关系不大

倒是跟shell很是相关

其实还是跟crontab最相关:)

当时crontab的log出错信息是:

/bin/sh: -c: line 0: unexpected EOF while looking for matching “’

/bin/sh: -c: line 1: syntax error: unexpected end of file

下面这是从命令man 5 crontab中摘出的一段话:

        The entire command portion of the line, up to  a  newline  or  %

 character,  will  be  executed by /bin/sh or by the shell specified in

 the SHELL variable of the cronfile.  Percent-signs (%) in the command,

 unless  escaped with backslash (\), will be changed into newline char-

 acters, and all data after the first % will be sent to the command  as

 standard input.

意思就是说crontab将忽略"%"后面的字串

把其当作前面命令的输入部分

而且还有个crontab的例子

用来说明这个:

0 22 * * 1-5   mail -s "It’s 10pm" joe%Joe,%%Where are your kids?%