?? setproperties.htm
字號:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>設置屬性的功能</title>
<style>
td{font-size:12px;}
button{
border:solid 1px #333399;
background:url(../image/node.png);
width:70px;
}
</style>
<script>
function show(/*object*/info){
//傳入屬性,然后在本頁面的文本框內顯示
//此方法由主頁面調用
document.form1.index.value=info.index;
document.form1.nodeName.value=info.name;
document.form1.comment.innerText=info.comment==null?"":info.comment;
//other infos
//TODO
document.form1.nodeName.focus();
}
function setProp(){
if(!valid()){
alert('信息填寫錯誤');
return;
}
var info=new Object();
//將本頁的信息添加到info中
info.name=document.form1.nodeName.value;
info.comment=document.form1.comment.innerText;
//other infos
//TODO
parent.setProperties(info);
}
function valid(){
//驗證
//TODO
return true;
}
</script>
</head>
<body style="margin:0px">
<form name="form1" onSubmit="setProp();return false;">
<table border="0px" width="100%" height="100%">
<tr>
<td colspan="4" height="16px" bgcolor="#336699" style="color:white">
屬性設置
</td>
</tr>
<tr>
<td>序號</td>
<td><input type="text" readonly name="index" value="" style="background-color:#cccccc"/>
<td>名稱</td>
<td><input type="text" name="nodeName" value="" />
</tr>
<tr valign="top">
<td>備注</td>
<td colspan="3"><textarea name="comment" style="width:99%;height:60px"></textarea>
</tr>
<tr>
<td colspan="4" align="center"><button onclick='setProp()'>確定</button>
<button onclick="parent.hidePropertiesPane()">關閉</button></td>
</tr>
</table>
</form>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -