showModleWindow

<script type="text/javascript">
function fnRandom(iModifier){
   return parseInt(Math.random()*iModifier);
}
function fnSetValues(){
   var iHeight=oForm.oHeight.options[
      oForm.oHeight.selectedIndex].text;
   if(iHeight.indexOf("Random")>-1){
      iHeight=fnRandom(document.body.clientHeight);
   }
   var sFeatures="dialogHeight: " + iHeight + "px;";
   return sFeatures;
}
function fnOpen(){
   var sFeatures=fnSetValues();
   window.showModalDialog("showModalDialog_target.htm", "",
      sFeatures)
}
</script>
<form name="oForm">
    Dialog Height
    <select name="oHeight">
        <option>-- Random --</option>
        <option>150</option>
        <option>200</option>
        <option>250</option>
        <option>300</option>
    </select>
    Create Modal Dialog Box
    <input type="button" value="Push To Create" onclick="fnOpen()">
</form>pasting
posted @ 2010-01-11 16:24  小师傅  阅读(136)  评论(0编辑  收藏  举报