try
{
if (document.getElementById('selected')<>'null')
{
document.getElementById('selected').className='isSelectedColor'
}
}
catch(exceptionobj)
{
alert("随你怎么处理")
}
{
if (document.getElementById('selected')<>'null')
{
document.getElementById('selected').className='isSelectedColor'
}
}
catch(exceptionobj)
{
alert("随你怎么处理")
}
查过了,不明白的是一个变量
exceptionobj是什么?
直接写成catch(e)就行了,省事。
if (document.getElementById('selected')!=null) {
document.getElementById('selected').className='isSelectedColor'
}
</SCRIPT>
<meta http-equiv='content-type' content='text/html; charset=gb2312'>
<style>
body, td, th
{
FONT-SIZE: 9pt;
}
input, select, button, textarea {
BACKGROUND-COLOR: #FFFFFF; BORDER-TOP: #666666 1px solid;
BORDER-BOTTOM: #666666 1px solid;
BORDER-LEFT: #666666 1px solid;
BORDER-RIGHT: #666666 1px solid;
}
.iframe {
BACKGROUND-COLOR: #FFFFFF; BORDER-TOP: #666666 1px solid;
BORDER-BOTTOM: #666666 1px solid;
BORDER-LEFT: #666666 1px solid;
BORDER-RIGHT: #666666 1px solid;
}
.input1 {
BACKGROUND-COLOR: #F6F6F6; BORDER-TOP: 0px solid;
BORDER-BOTTOM: 0px solid;
BORDER-LEFT: 0px solid;
BORDER-RIGHT: 0px solid;
}
</style>
</head> <body bgcolor=#F6F6F6>
<style>
.isSelectedColor {
BORDER-TOP: #0000FF 1px solid;
BORDER-BOTTOM: #0000FF 1px solid;
BORDER-LEFT: #0000FF 1px solid;
BORDER-RIGHT: #0000FF 1px solid; CURSOR: hand;
}
.noSelectedColor {
BORDER-TOP: #F6F6F6 1px solid;
BORDER-BOTTOM: #F6F6F6 1px solid;
BORDER-LEFT: #F6F6F6 1px solid;
BORDER-RIGHT: #F6F6F6 1px solid; CURSOR: hand;
}
.overSelectedColor {
BORDER-TOP: #0000FF 1px solid;
BORDER-BOTTOM: #0000FF 1px solid;
BORDER-LEFT: #0000FF 1px solid;
BORDER-RIGHT: #0000FF 1px solid; CURSOR: hand;
}
</style>
<script>
var Theme = new Object();
Theme.selected = '';
Theme.s = 0; Theme.mouseOver = function(obj){
if (Theme.selected == obj) {
return false;
}
obj.className = 'overSelectedColor';
} Theme.mouseOut = function(obj){
if (Theme.selected == obj) {
return false;
}
obj.className = 'noSelectedColor';
try
{
if (document.getElementById('selected')<>'null')
{
document.getElementById('selected').className='isSelectedColor'
}
}
catch(e)
{
alert()
}
} Theme.click = function(obj, name){
try
{
if (Theme.s <> 0) {
if (document.getElementById('selected')<>'null')
{
document.getElementById('selected').className='isSelectedColor'
}
}
Theme.s = 1;
}
catch(e)
{
alert();
}
if (Theme.selected) {
Theme.selected.className = 'noSelectedColor';
} if (obj) {
obj.className = 'isSelectedColor';
Theme.selected = obj;
}
document.themeForm('mydata[theme_name]').value = name;
}
</script>
<iframe name=__post__ id=__post__ style='width:0; height:0; display:none'></iframe>
<form method=post name=themeForm action='./aa.php?fid=10&step=2' onSubmit='if(!confirm("确定吗?")) return false;' onReset='Theme.click(Theme.selectedBackup, Theme.selectedNameBackup)' target=__post__>
<fieldset style='BORDER: #D6D7BD 1px solid;'><legend><font color=#0041D6>修改</font></legend>
<table cellpadding=4 cellspacing=1 style='BORDER: #DDDDDD 0px solid; BACKGROUND-COLOR: #F1F1F1; width=100%></table>
<table cellpadding=0 cellspacing=0 border=0 width=0 height=3><tr><td></td></tr></table>
<table cellpadding=5 cellspacing=4 style='BORDER: #DDDDDD 0px solid; BACKGROUND-COLOR: #F6F6F6; width=100%>
<tr>
</tr>
<tr>
<td><img src=../../../.././hy_news/theme/runing/default/preview.jpg width=100 height=100 onMouseOver='Theme.mouseOver(this)' onMouseOut='Theme.mouseOut(this)' onClick='Theme.click(this, "default");' class='noSelectedColor' alt='ĬÈÏ·ç¸ñ'></td>
<td><img src=../../../.././hy_news/theme/runing/default1/preview.jpg width=100 height=100 onMouseOver='Theme.mouseOver(this)' onMouseOut='Theme.mouseOut(this)' onClick='Theme.click(this, "default1");' class='noSelectedColor' alt='1'></td>
<td><img src=../../../.././hy_news/theme/runing/default2/preview.jpg width=100 height=100 onMouseOver='Theme.mouseOver(this)' onMouseOut='Theme.mouseOut(this)' onClick='Theme.click(this, "default2");' class='noSelectedColor' alt='2'></td>
</tr>
<tr>
<td><img src=../../../.././hy_news/theme/runing/default3/preview.jpg width=100 height=100 onMouseOver='Theme.mouseOver(this)' onMouseOut='Theme.mouseOut(this)' onClick='Theme.click(this, "default3");' class='noSelectedColor' alt='3'></td>
<td><img src=../../../.././hy_news/theme/runing/default4/preview.jpg width=100 height=100 onMouseOver='Theme.mouseOver(this)' onMouseOut='Theme.mouseOut(this)' onClick='Theme.click(this, "default4");' class='noSelectedColor' alt='4'></td>
<td><img src=../../../.././hy_news/theme/runing/default5/preview.jpg width=100 height=100 onMouseOver='Theme.mouseOver(this)' onMouseOut='Theme.mouseOut(this)' onClick='Theme.click(this, "default5");' class='noSelectedColor' alt='5'></td>
</tr>
<tr>
<td><img src=../../../.././hy_news/theme/runing/default6/preview.jpg width=100 height=100 onMouseOver='Theme.mouseOver(this)' onMouseOut='Theme.mouseOut(this)' onClick='Theme.click(this, "default6");' class='noSelectedColor' alt='6'></td></tr>
</table>
<table cellpadding=0 cellspacing=0 border=0 width=0 height=3><tr><td></td></tr></table></fieldset>
<table width=100% cellpadding=0 cellspacing=0 border=0><tr><td align=right><input type='submit' name='' value='确定' ><input type='reset' name='' value='重位' onclick="document.getElementById('selected').className='isSelectedColor'"> </td></tr></table>
<input type='hidden' name='mydata[theme_name]' value=''>
</form>
cloudchen(陈系上) :谢谢,是这个原因.
那么catch(e)是什么意思呢?