123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- // 13通信G5-2张岚凯 15互联网G5-3揭以诚
- Namespace.register("U.Control.Navgation_phone"); //注册命名空间;
- /*window.onload = function () {
- U.Control.Navgation_phone();
- }*/
- //生成导航条;logo图片自己设置
- U.Control.Navgation_phone = function () {
- var g = $$("div", { "className": "navgation" }, document.body);
- var a = $$("div", { "className": "navgation_head" }, g);
- var menu = $$("div", { "className": "menu", "onclick": "U.Control.Navgation_phone.menuopen()" }, a);
- var lo = $$("div", { "className": "navgation_head_logo", "innerHTML": "LOGO" }, a);
- var logo = $$("img", { "className": "navgation_head_logo_img" }, lo);
- var le = $$("div", { "className": "navgation_head_left", "id": "navgation_head_left" }, g);
- var c = $$("li", { "innerHTML": "首页", "onclick": "U.Control.Navgation_phone.update_content_first()" }, le);
- var d = $$("li", { "innerHTML": "关于我们", "onclick": "U.Control.Navgation_phone.update_content_second()" }, le);
- var e = $$("li", { "innerHTML": "服务中心", "onclick": "U.Control.Navgation_phone.update_content_third()" }, le);
- var f = $$("li", { "innerHTML": "联系我们", "onclick": "U.Control.Navgation_phone.update_content_four()" }, le);
- var s = $$("div", { "className": "navgation_head_search" }, a);
- var simg = $$("img", { "src": "search_phone.png" }, s);
- var con = $$("div", { "className": "navgation_content", "innerHTML": "A", "id": "navgation_content" }, g);
- return g;
- }
- //显示菜单
- U.Control.Navgation_phone.menuopen = function () {
- $("#navgation_head_left")[0].style.display = "block";
- }
- //更换内容同时关闭菜单栏;
- U.Control.Navgation_phone.update_content_first = function () {
- $("#navgation_head_left")[0].style.display = "none";
- $("#navgation_content")[0].innerHTML = 'A';
- }
- U.Control.Navgation_phone.update_content_second = function () {
- $("#navgation_head_left")[0].style.display = "none";
- $("#navgation_content")[0].innerHTML = 'B';
- }
- U.Control.Navgation_phone.update_content_third = function () {
- $("#navgation_head_left")[0].style.display = "none";
- $("#navgation_content")[0].innerHTML = 'C';
- }
- U.Control.Navgation_phone.update_content_four = function () {
- $("#navgation_head_left")[0].style.display = "none";
- $("#navgation_content")[0].innerHTML = 'D';
- }
|