效果如下:
![](https://i-blog.csdnimg.cn/blog_migrate/19cf97088897673f8938039bee25e2b9.jpeg)
程序:/Files/ipusr/topmenu.rar
后台脚本:
--
插入测试数据
insert
into
topmenu(
[
ID
]
,
[
parentId
]
,
[
text
]
,
[
url
]
,
[
target
]
,
[
IsBoot
]
,
[
visible
]
,
[
status
]
)
values
(
1
,
0
,
'
深圳
'
,
'
http://singlepine.cnblogs.com/articles/259955.html
'
,
'
self
'
,
0
,
'
false
'
,
'
深圳
'
)
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
insert
into
topmenu(
[
ID
]
,
[
parentId
]
,
[
text
]
,
[
url
]
,
[
target
]
,
[
IsBoot
]
,
[
visible
]
,
[
status
]
)
values
(
2
,
1
,
'
南山
'
,
'
http://singlepine.cnblogs.com/articles/259955.html
'
,
'
self
'
,
1
,
'
false
'
,
'
南山
'
)
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
insert
into
topmenu(
[
ID
]
,
[
parentId
]
,
[
text
]
,
[
url
]
,
[
target
]
,
[
IsBoot
]
,
[
visible
]
,
[
status
]
)
values
(
3
,
1
,
'
福田
'
,
'
http://singlepine.cnblogs.com/articles/259955.html
'
,
'
self
'
,
1
,
'
false
'
,
'
福田
'
)
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
insert
into
topmenu(
[
ID
]
,
[
parentId
]
,
[
text
]
,
[
url
]
,
[
target
]
,
[
IsBoot
]
,
[
visible
]
,
[
status
]
)
values
(
4
,
2
,
'
科技园
'
,
'
http://singlepine.cnblogs.com/articles/259955.html
'
,
'
self
'
,
2
,
'
false
'
,
'
科技园
'
)
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
insert
into
topmenu(
[
ID
]
,
[
parentId
]
,
[
text
]
,
[
url
]
,
[
target
]
,
[
IsBoot
]
,
[
visible
]
,
[
status
]
)
values
(
5
,
3
,
'
塞格
'
,
'
http://singlepine.cnblogs.com/articles/259955.html
'
,
'
self
'
,
2
,
'
false
'
,
'
塞格
'
)
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
insert
into
topmenu(
[
ID
]
,
[
parentId
]
,
[
text
]
,
[
url
]
,
[
target
]
,
[
IsBoot
]
,
[
visible
]
,
[
status
]
)
values
(
6
,
0
,
'
广州
'
,
'
http://singlepine.cnblogs.com/articles/259955.html
'
,
'
self
'
,
0
,
'
false
'
,
'
广州
'
)
![None.gif](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
insert
into
topmenu(
[
ID
]
,
[
parentId
]
,
[
text
]
,
[
url
]
,
[
target
]
,
[
IsBoot
]
,
[
visible
]
,
[
status
]
)
values
(
7
,
6
,
'
广州火车站
'
,
'
http://singlepine.cnblogs.com/articles/259955.html
'
,
'
self
'
,
1
,
'
false
'
,
'
广州火车站
'
)