<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
        <title><%=com.abc123.configuration.WebConfig.WEB_TITLE %></title>
        <link rel="stylesheet" type="text/css" href="AdminCss.css" />
<link rel="stylesheet" type="text/css" href="/css/css.css" />
<link rel="stylesheet" type="text/css" href="/css/smoothness/jquery-ui.css" />
<script type="text/javascript" src="/js/colorwinglib.js"></script>
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/jquery-ui.js"></script>
        <script language="JavaScript" src="../js/calendar.js"></script>
</head>
    <script type="text/javascript">
$(function() {
// 栏目使用流程ID,为空则不使用流程定义
$('#dialogSiteId').dialog({
autoOpen: false,
width: 500,
buttons: {
}
});
// Dialog Link
$('#txtStafftIdListlabel').click(function(){
$('#dialogSiteId').dialog('open');
return false;
});
});

//站点的按钮事件
function SiteIdClick(sId,sName)
{
//alert(sName);
$('#dialogSiteId').dialog('close');;
document.getElementById("txtStafftIdList").value = sId;
document.getElementById("txtStafftIdListlabel").value = sName;
}
</script> <body><table border="0" cellpadding="0" cellspacing="0" id="tbListSelect">
  <tr>
    <td>
文章ID
    </td>
    <td>
<input name="articleid" type="text" id="txtArticleidList" value="${Articleid}" title="文章ID" size="8" maxlength="60" />
    </td>
    <td>标题 </td>
    <td><input name="title" type="text" id="txtTitleList" value="${Title}" title="标题" size="30" maxlength="200" /></td>
    <td>类别</td>
    <td><select name="categories" id="dropCategoriesList" title="类别">
      <option value="">全部</option>
      
${CategoriesList}    </select></td>
  </tr>
  <tr>
    <td>
作者
    </td>
    <td>
<input name="stafftId"  type="hidden"  id="txtStafftIdList"  />
   <input name="stafftIdEditlabel" type="text" id="txtStafftIdListlabel"  title="" size="10" maxlength="50"  />
      <div id="dialogSiteId" title="请选择">
             <a href=# onclick="SiteIdClick('','全部')" title="">全部</a>
<a href=# onclick="SiteIdClick('2120','admin')" title="212">admin</a>
<a href=# onclick="SiteIdClick('2121','admin')" title="213">aaa</a>           
<a href=# onclick="SiteIdClick('2122','admin')" title="214">bbbb</a>
</div>
</td>
    <td>添加时间 </td>
    <td><input name="addtime" type="text" id="txtAddtime1List" value="${Addtime}" title="添加时间" size="10" maxlength="20" onclick="new Calendar().show(this);" readonly="readonly" />

  <input name="addtime" type="text" id="txtAddtime2List" value="${Addtime}" title="添加时间" size="10" maxlength="20"  onclick="new Calendar().show(this);" readonly="readonly"/></td>
    <td>浏览量 </td>
    <td><select name="attractiveness" type="text" id="dropAttractivenessList" value="${Attractiveness}" title="浏览量"/>
      <option>----全部----</option>
      <option value="1">0次以上5次以下</option>
      <option value="2">5次以上50次以下</option>
      <option value="3">50次以上100次以下</option>
      <option value="4">100次以上</option>    
     </select></td>
  </tr>
  <tr>
    <td colspan="6" align="center"><input type="button" name="button" id="button" value="搜索" onclick="search()" /></td>
  </tr>
<script type="text/javascript">
function search()
{
var locationHref=window.location.pathname + "?";
try{locationHref += "&articleids=" +  encodeURI(document.getElementById("txtArticleidList").value);}catch (ex){}//文章ID
try{locationHref += "&titles=" +  encodeURI(document.getElementById("txtTitleList").value);}catch (ex){}//标题
try{locationHref += "&categoriess=" +  encodeURI(document.getElementById("dropCategoriesList").value);}catch (ex){}//类别
try{locationHref += "&authors=" +  encodeURI(document.getElementById("txtAuthorList").value);}catch (ex){}//作者
try{locationHref += "&contents=" +  encodeURI(document.getElementById("txtContentList").value);}catch (ex){}//内容
try{locationHref += "&attractivenesss=" +  encodeURI(document.getElementById("dropAttractivenessList").value);}catch (ex){}//浏览量
try{locationHref += "&addtime1s=" +  encodeURI(document.getElementById("txtAddtime1List").value);}catch (ex){}//添加时间
try{locationHref += "&addtime2s=" +  encodeURI(document.getElementById("txtAddtime2List").value);}catch (ex){}//添加时间
locationHref += "&s=" + new Date().getTime();
window.location.href = locationHref;
}
try{document.getElementById("txtArticleidList").value = "<%= com.colorwinglib.Requests.GetString(request,"articleids") %>";}catch (ex){}
try{document.getElementById("txtTitleList").value = "<%= com.colorwinglib.Requests.GetString(request,"titles") %>";}catch (ex){}
try{document.getElementById("dropCategoriesList").value = "<%= com.colorwinglib.Requests.GetString(request,"categoriess") %>";}catch (ex){}
try{document.getElementById("txtAuthorList").value = "<%= com.colorwinglib.Requests.GetString(request,"authors") %>";}catch (ex){}
try{document.getElementById("txtContentList").value = "<%= com.colorwinglib.Requests.GetString(request,"contents") %>";}catch (ex){}
try{document.getElementById("txtAttractivenessList").value = "<%= com.colorwinglib.Requests.GetString(request,"attractivenesss") %>";}catch (ex){}
try{document.getElementById("txtAddtime1List").value = "<%= com.colorwinglib.Requests.GetString(request,"addtime1s") %>";}catch (ex){}
try{document.getElementById("txtAddtime2List").value = "<%= com.colorwinglib.Requests.GetString(request,"addtime2s") %>";}catch (ex){}</script>
</table>
    <input type="button" name="btnGoToEdit" id="btnGoToEdit" value="添加" onclick="window.location.href=window.location.pathname + '?pagetype=gotoinsert&${pageListUrl}'" />
    <div id="divlist">
            <table border="0" cellpadding="0" cellspacing="0" id="tbList">
            <thead>
            <tr>
                <td>
                    &nbsp;<a href="?pagetype=list&${pageListUrlOrderBy}&OrderByItem=N_ArticleID&OrderByItemDESC=${pageListOrderByItemDESCNo}">文章ID</a>
                </td>
                <td>
                    &nbsp;<a href="?pagetype=list&${pageListUrlOrderBy}&OrderByItem=C_Title&OrderByItemDESC=${pageListOrderByItemDESCNo}">标题</a>
                </td>
                <td>
                    &nbsp;<a href="?pagetype=list&${pageListUrlOrderBy}&OrderByItem=N_Categories&OrderByItemDESC=${pageListOrderByItemDESCNo}">类别</a>
                </td>
                <td>
                    &nbsp;<a href="?pagetype=list&${pageListUrlOrderBy}&OrderByItem=C_Author&OrderByItemDESC=${pageListOrderByItemDESCNo}">作者</a>
                </td>
                <td>
                    &nbsp;<a href="?pagetype=list&${pageListUrlOrderBy}&OrderByItem=N_Attractiveness&OrderByItemDESC=${pageListOrderByItemDESCNo}">浏览量</a>
                </td>
                <td>
                    &nbsp;<a href="?pagetype=list&${pageListUrlOrderBy}&OrderByItem=DT_AddTime&OrderByItemDESC=${pageListOrderByItemDESCNo}">添加时间</a>
                </td>
                <td>
                操作
                </td>
            </tr>
            </thead>
<s:iterator id="iteList" value="#request.ArticleList">
            <tr>
                <td>
&nbsp;${iteList.articleid}
                </td>
                <td>
&nbsp;${iteList.title}
                </td>
                <td>
&nbsp;${iteList.objCategoriesInfoByCategories.categoriesname}
                </td>
                <td>
&nbsp;${iteList.author}
                </td>
                <td>
&nbsp;${iteList.attractiveness}
                </td>
                <td>
&nbsp;${iteList.addtime.shortDate}
                </td>
                <td>
                        <a href="?pagetype=Details&${pageListUrl}&articleid=${iteList.articleid}">显示详细</a>
                        <a href="?pagetype=gotoupdate&${pageListUrl}&articleid=${iteList.articleid}">编辑</a>
                        <a onclick="if (confirm('你确定删除本条信息么?')) { window.location.href=window.location.pathname + '?pagetype=delete&${pageListUrl}&articleid=${iteList.articleid}'}" href="#">删除</a>
                </td>
            </tr>
</s:iterator>
            </table>
${pageDetails}
<script type="text/javascript" language="javascript" src="tableColor.js"></script>
    </div> </body>
</html>

解决方案 »

  1.   

    文本框的单击事件里window.open()
      

  2.   

    使用javascript,写一个方法,里面使用windows.open()
    在文本框里面加一个onFocus(获得焦点,即鼠标光标转到输入框)事件,调用上面的方法就可以实现
      

  3.   

    设置输入框的onfocus事件,在onfocus事件的方法里按照自己的想法去打开一个窗口
    windows.open()或windows.showdialog()或window.showModalDialog()等
      

  4.   

    点击输入框,那就是onclick事件啊,触发这个事件执行一个方法,这个方法里面就弹出一个窗体!
    window.showModalDialog()这个啊!