📄 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 + -