cool_calendar.aspx
上传用户:simon2hong
上传日期:2021-11-18
资源大小:16746k
文件大小:2k
- <%@ Page Language="C#" %>
- <html>
- <head>
- <title>日历控件设定</title>
- <script>
- function my_submit()
- {
- if(ITEM_NAME.value=="")
- {
- alert("控件名称不能为空");
- return;
- }
- if(edit_flag==0)
- {
- var parent_window = parent.dialogArguments;
- var control_html="<img src="../form/calendar.gif" class="DATE" align=absmiddle border=0 style="cursor:hand" value=""+ITEM_NAME.value.replace(""",""")+"" title="日期控件:"+ITEM_NAME.value.replace(""",""")+"">";
- parent_window.EDIT_HTML.insertHtml(control_html);
- }
- else
- {
- oSelection = dialogArguments.document.selection.createRange();
- sRangeType = dialogArguments.document.selection.type;
-
- if (sRangeType == "Control")
- {
- oSelection(0).value = ITEM_NAME.value;
- oSelection(0).title = "日期控件:"+ITEM_NAME.value;
- }
- }
- window.close();
- }
- //-- 获取控件属性 --
- var edit_flag=0;
- function LoadDo()
- {
- oSelection = dialogArguments.document.selection.createRange();
- sRangeType = dialogArguments.document.selection.type;
-
- if (sRangeType == "Control")
- {
- edit_flag=1;
- ITEM_NAME.value = oSelection(0).value;
-
- }
- ITEM_NAME.focus();
- }
- </script>
- </head>
- <body topmargin="0" onload="LoadDo();">
- <table border="0" cellspacing="1" width="100%" class="small" bgcolor="#ffffff" cellpadding="3" align="center">
- <tr class="TableContent">
- <td nowrap><b>对应的输入框控件</b> 名称:
- </td>
- <td nowrap>
- <Input name="ITEM_NAME" type="text" class="SmallInput" size="20">
- </td>
- </tr>
- <tr class="TableData">
- <td colspan="2">说明:通过日历控件选择的日期将回填到该输入框中
- </td>
- </tr>
- <tr>
- <td class="TableControl" colspan="2" align="center">
- <input type="submit" onclick="my_submit();" value="确 定" class="SmallButton">
- </td>
- </tr>
- </table>
- </body>
- </html>