求教,关于js
$("#meun1").tree({url: "Sys.svc/GetMenu",
animate: true,
onClick: function(node) {
if (node["id"] != 0) {
addTab(node["text"], node.attributes["url"]);
}
}
});
这段代码,
在IE 7 8,ff下面都没有问题
可以ok
但是在IE 6下面就挂掉了
主要就是从url指定的方法获得那个菜单(json格式的。)
--------------------编程问答-------------------- 在线等,请知道的朋友速度解答,,急··· --------------------编程问答-------------------- 友情帮顶 --------------------编程问答-------------------- 引用的是这个js文件
jquery.easyui.min.js --------------------编程问答-------------------- 关注..... --------------------编程问答-------------------- --------------------编程问答-------------------- 没人知道? --------------------编程问答-------------------- 如果有报js错误就把错误发出来看看 --------------------编程问答-------------------- 什么错误,观望中。。。 --------------------编程问答-------------------- http://jquery-easyui.wikidot.com/download:v105
换个版本试一试! --------------------编程问答-------------------- 我的版本就是1.0.5的。。 --------------------编程问答-------------------- 而且我调试中,
之前所有的方法全部进入调试
但是到了这个地方,就断了。。。
这个方法就不进去。 --------------------编程问答-------------------- 升级jquery版本吧 --------------------编程问答-------------------- jquery 永远用最新的mini版本.. 就不会出现浏览器不兼容的情况了.
这是我喜欢jquery的重要原因之一 --------------------编程问答-------------------- 刚进入页面报错是Expected identifier,string or number
line 14 char 3;
然后执行了一个function 成功以后
执行这个函数的时候
Object doesn't suppot this property or method
--------------------编程问答-------------------- <script type="text/javascript" src="Scripts/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="Scripts/jquery.easyui.min.js"></script>
<script type="text/javascript" src="Scripts/json2.js"></script>
<script type="text/javascript" src="Scripts/Code.js"></script>
<script type="text/javascript">
var Domainname = "";
var jsoninfo = "";
$(function() {
IsLogin(); //判断是否登录
getUserName();
});
function loadTabs() {
}
function addTab(title, href) {
var tt = $('#main-center');
if (tt.tabs('exists', title)) {
tt.tabs('select', title);
} else {
if (href) {
var content = '<iframe scrolling="no" frameborder="0" src="' + href + '" style="width:100%;height:100%;"></iframe>';
} else {
var content = '未实现';
}
tt.tabs('add', {
title: title,
closable: true,
content: content
});
}
}
function IsLogin() {
$.ajax({
url: "Sys.svc/GetMenu",
dataType: "json",
type: "post",
success: function(result) {
alert(result);
if (result == null || result == 0) {
window.location.href = "login.html";
}
else {
$("#meun1").tree({
url: "Sys.svc/GetMenu",
animate: true,
onClick: function(node) {
if (node["id"] != 0) {
addTab(node["text"], node.attributes["url"]);
}
}
});
}
},
error: function() {
window.location.href = "login.html";
}
});
}
function logonOut() {
window.location.href = "loginOut.html";
}
function getUserName() {
var str = "";
var now = new Date(), hour = now.getHours()
if (hour < 6) { str = "凌晨好"; }
else if (hour < 9) { str = "早上好"; }
else if (hour < 12) { str = "上午好"; }
else if (hour < 14) { str = "中午好"; }
else if (hour < 17) { str = "下午好"; }
else if (hour < 19) { str = "傍晚好"; }
else if (hour < 22) { str = "晚上好"; }
else { str = "夜里好"; }
$.ajax({
url: "Sys.svc/getUserName",
dataType: "json",
type: "post",
success: function(result) {
if (result != "0") {
str += ":" + result;
$("#LoginName").html(str);
}
else {
}
}
});
}
</script>
</head>
<body style="margin: 0; padding: 0;" class="easyui-layout">
<div region="north" border="false" style="overflow: hidden; height: 60px; background: #A4BED4;">
<div style="float: left;">
<h2 style="margin-bottom: 8px;">
后台管理</h2>
<div id="LoginName" style="margin-bottom: 15px; padding-left: 20px;">
</div>
</div>
<div style="float: right; vertical-align: bottom; line-height: 100px; margin-right: 20px;">
<a href="javascript:void(0)" onclick="logonOut()">注销登录</a>
</div>
</div>
<div region="west" split="true" title="导航菜单" style="width: 200px; padding-top: 20px;">
<ul id="meun1">
</ul>
</div>
<div region="center" title="" style="background: #eee;">
<div id="main-center" class="easyui-tabs" fit="true" border="false">
<div title="后台首页" style="padding: 20px; overflow: hidden;">
<div style="margin-top: 20px;">
后台管理
</div>
</div>
</div>
</div>
<div id="w" class="easyui-window" title="编辑信息" icon="icon-save" closed="true" max="true"
style="width: 500px; height: 200px; padding: 5px; background: #fafafa;">
<div class="easyui-layout" fit="true">
<div region="center" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
jQuery EasyUI framework help you build your web page easily.
</div>
<div region="south" border="false" style="text-align: right; height: 30px; line-height: 30px;">
<a class="easyui-linkbutton" icon="icon-ok" href="javascript:void(0)" onclick="close1()">
Ok</a> <a class="easyui-linkbutton" icon="icon-cancel" href="javascript:void(0)"
onclick="close1()">Cancel</a>
</div>
</div>
</div>
这个是所有的源代码。。
一个小站的后台页面
我检查了半天也没检查出来为什么IE6下面就挂了
补充:.NET技术 , ASP.NET