jquery+jqModal.js兑现弹出窗口

jquery+jqModal.js实现弹出窗口

请记住一定要有下面的第一行:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

<head>

  <script src="js/jquery.js" type="text/javascript"></script>  
  <script src="js/jqModal.js" type="text/javascript"></script>  
  <link rel="stylesheet" href="css/jqModal.css" type="text/css" media="screen" />  
 <title>新建网页 1</title>
 <script type="text/javascript">
    function showjqm(){
     $('#showdiv').jqm({modal: true, trigger: 'a.showDialog'});
     $('#settextvalue').attr("value",$('#valuetext').val());
    $('#showdiv').jqmShow();
    }
    function hidewin()
    {
    $('#valuetext').attr("value",$('#settextvalue').val());
     $('#showdiv').jqmHide();
    }
    $( function() {  
      $('#showdiv').jqm();  
    })
 </script>
</head>

<body>
  <input id="showbutton" type="button" value="显示" onclick="showjqm()" />  
  <input type="text" id="valuetext" name="valuetext" value="sdfsdfs">
 
  <div id="showdiv" class="jqmWindow">  
   输入:
   <input type="text" name="settextvalue" id="settextvalue" />  
    <input type="button" name="close" class="jqmClose" value="关闭" />
    
    <input type="button" name="ok" id="ok" value="设置" onclick="hidewin()" />
  </div>

</body>

</html>