6.在文本框中输入一个年份,判断其生肖,并输出在文本框旁边。
对html和javaServlet都要求写出。
7.Ajax从服务器取数据 {id:123, name:”baidu”, username:”mm”,checked:true};
分析name对应的值(”baidu”).(题目较长,不记得了)
$txt = "{id:123, name:\"baidu\", username:\"mm\",checked:true}";
preg_match("/name:\"(\w+)\"/i",$txt, $matches);
print_r($matches);
echo $matches[1];
8.谈关于客户体验的问题。
第二部分:
1.Ajax,数据库触发器,GUI,中断机制的共同思想。谈一谈该种思想(机制)。
2.把一篇英文文档中所有单词的首字母转为大写,文档存在doc.txt中。可以在多种编程语言中选择(C\C++,JAVA,PHP…)写出你的思路,尽量优化你的程序。
$str = "Hello! nice to meet you!";
// 回调函数
function callfun($matches)
{
return strtoupper($matches[1]);
}
echo preg_replace_callback(
"#(\s\b.{1})#si",
"callfun",
$str);