Write a script. in PHP and Javascript. to accept two textarea's, slot and alternative by the name.
+ slot can contain many a lines, each line includes many words and is ended by a number
+ the chars in the slot can only be either alpha-numeric chars or squares or underlines
+ if a word in the slot is surrounded by underlines, it must start a new line in the alternatives,
followed by the detailed definition of the word
+ the square brackets should come in pairs
for example, the following is legal slot and alternative:
SLOT ALTERNATIVE
---------------------- --------------------------
| this is 1 | | _this_ th ee s |
| the is 1 | | |
| this's 2 | | |
| _this_ 2 | | |
---------------------- --------------------------
第1题:
A."HelloWorld";
B.echo"HelloWorld";
C.Document.Write("HelloWorld");
D.write(“HelloWorld”);
第2题:
A.text
B.password
C.radio
D.textarea
第3题:
A.12345
B.12245
C.22345
D.11345
第4题:
About ________ of the workers in the factory were born in the ________.
A.two-thirds, 1970 B.two-thirds, 1970s C.two-third,1970 D.two-third, 1970s
第5题:
有以下程序: main() { char *S[]={"one","two","three"},*p; p=s[1]; printf("%c,%s\n", *(p+1), s[0]); } 执行后输出结果是( )。
A.n,two
B.t,one
C.w,one
D.o,two
第6题:
有以下程序: matin() { char * s[]={"one", "two", "three"}, *p; p=s[1]; printf("% c, % s\n", *(p+1),s [o]); } 执行后的输出结果是______。
A.n, two
B.t, one
C.w, one
D.o, two
第7题:
. 分别用 PHP 和Javascript. 来验证两个分别叫 slot 和 alternative 的文本框里面的内容:
+ slot 可以包含许多行,每行又包含若干个单词,并且以数字结尾
+ slot 中的每个单词只能由数字、字母、方括号和下划线构成
+ 如果 slot 中的某个单词前后各有相同书面的下划线,则这个单词必须在 alternatives 另起一
行,并带有其定义
+ 方括号必须成对出现
例如,下面的 slot 和 alternative 是正确的:
SLOT ALTERNATIVE
---------------------- --------------------------
| this is 1 | | _this_ th ee s |
| the is 1 | | |
| this's 2 | | |
| _this_ 2 | | |
---------------------- --------------------------
第8题:
有以下程序 main( ) { char *s[ ]={"one","two","three"},*p; p=s[1]; printf("%c,%s\n",*(p+1),s[0]); } 执行后输出结果是
A.n,two
B.t,one
C.w,one
D.o,two
第9题:
有以下程序
main()
{char *s[]={"one","two","three"},*p;
p=s[1];
printf("%c,%s\n",*(p+1),s[0]);
}
执行后输出结果是
A.n,two
B.t,one
C.w,one
D.O,two
第10题:
12. About_______ of the workers in the factory were born in the __________.
A. two- thirds;1970
B. two- thirds ; 1970s
C. two-third ; 1970
D. two-third ; 1970s