如图的错误
下面是代码<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="ext-4.0.2a/ext-all.js" type="text/javascript"></script>
<script src="ext-4.0.2a/bootstrap.js" type="text/javascript"></script>
<link href="ext-4.0.2a/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
Ext.require([
'Ext.data.*',
'Ext.grid.*',
'Ext.tree.*'
]); Ext.onReady(function () {
Ext.define('Task', {
extend: 'Ext.data.Model',
fields: [
{ name: 'task', type: 'string' },
{ name: 'user', type: 'string' },
{ name: 'duration', type: 'string' }
]
}); var store = Ext.create('Ext.data.TreeStore', {
model: 'Task',
proxy: {
type: 'ajax',
url: 'treegrid.json'
},
folderSort: true
}); var tree = Ext.create('Ext.tree.Panel', {
id: 'treegrid',
title: 'Core Team Projects',
width: 500,
height: 300,
renderTo: Ext.getBody(),
collapsible: true,
useArrows: true,
rootVisible: false,
store: store,
multiSelect: true,
singleExpand: true,
columns: [{
xtype: 'treecolumn',
text: '项目列表',
flex: 2,
sortable: true,
dataIndex: 'task'
}, {
text: '可见',
flex: 1,
sortable: true,
dataIndex: 'duration',
align: 'center',
renderer: function (v) {
if (v == 1) {
return "<input id='show' type='image' src='images/false.png' onclick='SetStatus(this);' />";
} else if (v == 2) {
var min = v - Math.floor(v);
return "<input id='show1' type='image' src='images/neglect.png' onclick='SetStatus(this);' />";
} else if (v == 3) {
return "<input id='show2' type='image' src='images/true.png' onclick='SetStatus(this);' />";
} else {
return "";
}
} }, {
text: '可编辑',
flex: 1,
dataIndex: 'user',
sortable: true,
align: 'center',
renderer: function (v) {
if (v == 1) {
return "<input id='show' type='image' src='images/false.png' onclick='SetStatus(this);' />";
} else if (v == 2) {
return "<input id='show1' type='image' src='images/neglect.png' onclick='SetStatus(this);' />";
} else if (v == 3) {
return "<input id='show2' type='image' src='images/true.png' onclick='SetStatus(this);' />";
} else {
return "";
}
}
}]
});
}); function SetStatus(obj) {
var imgurl = obj.src;
var type = imgurl.substring(imgurl.lastIndexOf("/") + 1, imgurl.indexOf("."));
if (type == "true") {
obj.src = imgurl.substring(0, imgurl.lastIndexOf("/") + 1) + "false.png";
} else if (type == "false") {
obj.src = imgurl.substring(0, imgurl.lastIndexOf("/") + 1) + "neglect.png";
} else {
obj.src = imgurl.substring(0, imgurl.lastIndexOf("/") + 1) + "true.png";
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
下面是JSON:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="ext-4.0.2a/ext-all.js" type="text/javascript"></script>
<script src="ext-4.0.2a/bootstrap.js" type="text/javascript"></script>
<link href="ext-4.0.2a/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
Ext.require([
'Ext.data.*',
'Ext.grid.*',
'Ext.tree.*'
]); Ext.onReady(function () {
Ext.define('Task', {
extend: 'Ext.data.Model',
fields: [
{ name: 'task', type: 'string' },
{ name: 'user', type: 'string' },
{ name: 'duration', type: 'string' }
]
}); var store = Ext.create('Ext.data.TreeStore', {
model: 'Task',
proxy: {
type: 'ajax',
url: 'treegrid.json'
},
folderSort: true
}); var tree = Ext.create('Ext.tree.Panel', {
id: 'treegrid',
title: 'Core Team Projects',
width: 500,
height: 300,
renderTo: Ext.getBody(),
collapsible: true,
useArrows: true,
rootVisible: false,
store: store,
multiSelect: true,
singleExpand: true,
columns: [{
xtype: 'treecolumn',
text: '项目列表',
flex: 2,
sortable: true,
dataIndex: 'task'
}, {
text: '可见',
flex: 1,
sortable: true,
dataIndex: 'duration',
align: 'center',
renderer: function (v) {
if (v == 1) {
return "<input id='show' type='image' src='images/false.png' onclick='SetStatus(this);' />";
} else if (v == 2) {
var min = v - Math.floor(v);
return "<input id='show1' type='image' src='images/neglect.png' onclick='SetStatus(this);' />";
} else if (v == 3) {
return "<input id='show2' type='image' src='images/true.png' onclick='SetStatus(this);' />";
} else {
return "";
}
} }, {
text: '可编辑',
flex: 1,
dataIndex: 'user',
sortable: true,
align: 'center',
renderer: function (v) {
if (v == 1) {
return "<input id='show' type='image' src='images/false.png' onclick='SetStatus(this);' />";
} else if (v == 2) {
return "<input id='show1' type='image' src='images/neglect.png' onclick='SetStatus(this);' />";
} else if (v == 3) {
return "<input id='show2' type='image' src='images/true.png' onclick='SetStatus(this);' />";
} else {
return "";
}
}
}]
});
}); function SetStatus(obj) {
var imgurl = obj.src;
var type = imgurl.substring(imgurl.lastIndexOf("/") + 1, imgurl.indexOf("."));
if (type == "true") {
obj.src = imgurl.substring(0, imgurl.lastIndexOf("/") + 1) + "false.png";
} else if (type == "false") {
obj.src = imgurl.substring(0, imgurl.lastIndexOf("/") + 1) + "neglect.png";
} else {
obj.src = imgurl.substring(0, imgurl.lastIndexOf("/") + 1) + "true.png";
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
能够运行成功,但是成功后一段操作节点一段时间后老是会出现如图的错误,求大侠指导!
下面是代码<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="ext-4.0.2a/ext-all.js" type="text/javascript"></script>
<script src="ext-4.0.2a/bootstrap.js" type="text/javascript"></script>
<link href="ext-4.0.2a/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
Ext.require([
'Ext.data.*',
'Ext.grid.*',
'Ext.tree.*'
]); Ext.onReady(function () {
Ext.define('Task', {
extend: 'Ext.data.Model',
fields: [
{ name: 'task', type: 'string' },
{ name: 'user', type: 'string' },
{ name: 'duration', type: 'string' }
]
}); var store = Ext.create('Ext.data.TreeStore', {
model: 'Task',
proxy: {
type: 'ajax',
url: 'treegrid.json'
},
folderSort: true
}); var tree = Ext.create('Ext.tree.Panel', {
id: 'treegrid',
title: 'Core Team Projects',
width: 500,
height: 300,
renderTo: Ext.getBody(),
collapsible: true,
useArrows: true,
rootVisible: false,
store: store,
multiSelect: true,
singleExpand: true,
columns: [{
xtype: 'treecolumn',
text: '项目列表',
flex: 2,
sortable: true,
dataIndex: 'task'
}, {
text: '可见',
flex: 1,
sortable: true,
dataIndex: 'duration',
align: 'center',
renderer: function (v) {
if (v == 1) {
return "<input id='show' type='image' src='images/false.png' onclick='SetStatus(this);' />";
} else if (v == 2) {
var min = v - Math.floor(v);
return "<input id='show1' type='image' src='images/neglect.png' onclick='SetStatus(this);' />";
} else if (v == 3) {
return "<input id='show2' type='image' src='images/true.png' onclick='SetStatus(this);' />";
} else {
return "";
}
} }, {
text: '可编辑',
flex: 1,
dataIndex: 'user',
sortable: true,
align: 'center',
renderer: function (v) {
if (v == 1) {
return "<input id='show' type='image' src='images/false.png' onclick='SetStatus(this);' />";
} else if (v == 2) {
return "<input id='show1' type='image' src='images/neglect.png' onclick='SetStatus(this);' />";
} else if (v == 3) {
return "<input id='show2' type='image' src='images/true.png' onclick='SetStatus(this);' />";
} else {
return "";
}
}
}]
});
}); function SetStatus(obj) {
var imgurl = obj.src;
var type = imgurl.substring(imgurl.lastIndexOf("/") + 1, imgurl.indexOf("."));
if (type == "true") {
obj.src = imgurl.substring(0, imgurl.lastIndexOf("/") + 1) + "false.png";
} else if (type == "false") {
obj.src = imgurl.substring(0, imgurl.lastIndexOf("/") + 1) + "neglect.png";
} else {
obj.src = imgurl.substring(0, imgurl.lastIndexOf("/") + 1) + "true.png";
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
下面是JSON:<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="ext-4.0.2a/ext-all.js" type="text/javascript"></script>
<script src="ext-4.0.2a/bootstrap.js" type="text/javascript"></script>
<link href="ext-4.0.2a/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
Ext.require([
'Ext.data.*',
'Ext.grid.*',
'Ext.tree.*'
]); Ext.onReady(function () {
Ext.define('Task', {
extend: 'Ext.data.Model',
fields: [
{ name: 'task', type: 'string' },
{ name: 'user', type: 'string' },
{ name: 'duration', type: 'string' }
]
}); var store = Ext.create('Ext.data.TreeStore', {
model: 'Task',
proxy: {
type: 'ajax',
url: 'treegrid.json'
},
folderSort: true
}); var tree = Ext.create('Ext.tree.Panel', {
id: 'treegrid',
title: 'Core Team Projects',
width: 500,
height: 300,
renderTo: Ext.getBody(),
collapsible: true,
useArrows: true,
rootVisible: false,
store: store,
multiSelect: true,
singleExpand: true,
columns: [{
xtype: 'treecolumn',
text: '项目列表',
flex: 2,
sortable: true,
dataIndex: 'task'
}, {
text: '可见',
flex: 1,
sortable: true,
dataIndex: 'duration',
align: 'center',
renderer: function (v) {
if (v == 1) {
return "<input id='show' type='image' src='images/false.png' onclick='SetStatus(this);' />";
} else if (v == 2) {
var min = v - Math.floor(v);
return "<input id='show1' type='image' src='images/neglect.png' onclick='SetStatus(this);' />";
} else if (v == 3) {
return "<input id='show2' type='image' src='images/true.png' onclick='SetStatus(this);' />";
} else {
return "";
}
} }, {
text: '可编辑',
flex: 1,
dataIndex: 'user',
sortable: true,
align: 'center',
renderer: function (v) {
if (v == 1) {
return "<input id='show' type='image' src='images/false.png' onclick='SetStatus(this);' />";
} else if (v == 2) {
return "<input id='show1' type='image' src='images/neglect.png' onclick='SetStatus(this);' />";
} else if (v == 3) {
return "<input id='show2' type='image' src='images/true.png' onclick='SetStatus(this);' />";
} else {
return "";
}
}
}]
});
}); function SetStatus(obj) {
var imgurl = obj.src;
var type = imgurl.substring(imgurl.lastIndexOf("/") + 1, imgurl.indexOf("."));
if (type == "true") {
obj.src = imgurl.substring(0, imgurl.lastIndexOf("/") + 1) + "false.png";
} else if (type == "false") {
obj.src = imgurl.substring(0, imgurl.lastIndexOf("/") + 1) + "neglect.png";
} else {
obj.src = imgurl.substring(0, imgurl.lastIndexOf("/") + 1) + "true.png";
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
能够运行成功,但是成功后一段操作节点一段时间后老是会出现如图的错误,求大侠指导!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货