网页中,单击一个文本框,然后在文本框处弹出一个层或者对话框之类的东西,上面有1,2,3,4,5五个数字和确认、取消按钮,点击任何一个数字,然后按确认键,就把选择的数字存入数据库,同时该层关闭,文本框中显示刚才输入的数字。

解决方案 »

  1.   

    可以JS控制  可以 后台
    js就写一个层 的 显示与影藏 
    后台就放一个panel  或者 div啥的  转化成服务器控件   后台的显示与影藏  判断
      

  2.   

    能不能帮贴个代码的框架,JS刚入门,看现在的JS日历代码有些地方不是很明白
      

  3.   

    http://www.google.com.hk/search?q=js+%E5%B1%82++%E6%98%BE%E7%A4%BA+%E9%9A%90%E8%97%8F&client=aff-os-360se&forid=&ie=utf-8&oe=UTF-8&aq=f&aqi=&aql=&oq=&gs_rfai=
      

  4.   

    简单来说就是使用JS来弹出一个DIV
    <div id="div1" style='display:none'>弹出层,这个里面就是你自己随便写什么啦</div>
    点击文本框就把div1给显示出来或者JS创建DIV层,设置样式,点击文本框就显示这个DIV层
      

  5.   

    <input type="text" id="txtAsset" onclick="$('ulTree').show();"/> <div class="relative"  >
        <div id="divTree" style="position:absolute;top:26px;left:150px; z-index:999;background:#F2F9Ff;border:#ccc 1px solid;overflow:hidden;">
             <ul id="ulTree" style="display:none;list-style-type:none;margin: 0 0 0 0px;padding: 0;">
    </ul>
             </div></div>
    大致思路
      

  6.   

    onblur="show('div1')"  
      function show(obj)   
      {
      var range = getRange();
      $('div2').style.width = range.width + "px";
      $('div2').style.height = range.height + "px";
      $('div2').style.display = "block";
      document.getElementById(obj).style.display="";
        
      }
      function getRange()   
      {
      var top= document.body.scrollTop;
      var left= document.body.scrollLeft;
      var heigh = document.body.clientHeight;
      var width = document.body.clientWidth;
      if (top==0 && left==0 && height==0 && width==0)  
      {
      top = document.documentElement.scrollTop;
      left= document.documentElement.scrollLeft;
      height= document.documentElement.clientHeight;
      width = document.documentElement.clientWidth;
      }
      return {top:top ,left:left ,height:height ,width:width } ;
      }  
    div中点击按钮,document.etelementbyid赋值
      

  7.   

    <!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>无标题页</title>
        <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
        <script type="text/javascript">
            $(document).ready(function(){
        $("#tip").focus(function(){
                 $("#res").css({"left":($(window).width()-$("#res").width())/2+"px","top":($(window).height()-$("#res").height())/2+"px","display":"block"});            })
                $("#aaa").click(function(){
    $.ajax({
        url:"",
        type:"",
        data:"",
        success:function(){}
    })
    $("#tip").val($("#oldtip").val());
                    $("#res").css("display","none");
                })
            })
        </script></head>
    <body>    
    <input id="tip" type="text"/>
        <div id="res" style="width:300px;height:300px;border:1px solid #ccc;z-index:10; background:yellow;position:absolute; display:none;">
    <input id="oldtip" type="text"/>
            <a id="aaa" href="javascript:void(0)">关闭</a>
        </div>
    </body></html>
      

  8.   

    用脚本弹出一个iframe,在网页上写一个方法,点击iframe的确定时,调用网页的方法,给其赋值。
    parent.方法