<script language= "javascript " for= "window " event= "onload ">

本文介绍如何使用JavaScript进行事件绑定,特别是通过window对象的onload事件来实现页面加载完成后的操作。文章详细解释了如何利用attachEvent方法绑定事件。

<script language= "javascript " for= "window " event= "onload ">

EVENT   event   设置或获取脚本编写用于的事件  
FOR   htmlFor   设置或获取绑定到事件脚本的对象。

可以这样理解。

<script   language= "javascript "   for= "window "   event= "onload ">
相当于
<script   language= "javascript ">
//   绑定
window.attachEvent( "onload ",function()   {
//   TODO
})
</script>
<!DOCTYPE html> <html> <head> <title><#Web_Title#> - <#menu5_6_2#></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Expires" content="-1"> <link rel="shortcut icon" href="images/favicon.ico"> <link rel="icon" href="images/favicon.png"> <link rel="stylesheet" type="text/css" href="/bootstrap/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="/bootstrap/css/main.css"> <link rel="stylesheet" type="text/css" href="/bootstrap/css/engage.itoggle.css"> <script type="text/javascript" src="/jquery.js"></script> <script type="text/javascript" src="/bootstrap/js/bootstrap.min.js"></script> <script type="text/javascript" src="/bootstrap/js/engage.itoggle.min.js"></script> <script type="text/javascript" src="/state.js"></script> <script type="text/javascript" src="/general.js"></script> <script type="text/javascript" src="/itoggle.js"></script> <script type="text/javascript" src="/popup.js"></script> <script type="text/javascript" src="/help.js"></script> <script> var $j = jQuery.noConflict(); $j(document).ready(function() { init_itoggle('help_enable'); }); </script> <script> <% login_state_hook(); %> function initial(){ show_banner(1); show_menu(5,7,1); show_footer(); if(document.form.computer_name2.value != "") document.form.computer_name.value = decodeURIComponent(document.form.computer_name2.value); else document.form.computer_name.value = ""; document.form.http_passwd2.value = ""; if (login_safe()){ showhide_div('row_user', 1); showhide_div('row_pass1', 1); showhide_div('row_pass2', 1); } load_body(); } function applyRule(){ if(validForm()){ showLoading(); if(document.form.http_passwd2.value.length > 0) document.form.http_passwd.value = document.form.http_passwd2.value; document.form.action_mode.value = " Apply "; document.form.current_page.value = "/Advanced_System_Content.asp"; document.form.next_page.value = ""; document.form.submit(); } } function validForm(){ if(!validate_string(document.form.http_username)) return false; if(!validate_string(document.form.http_passwd2) || !validate_string(document.form.v_password2)) return false; if(document.form.http_passwd2.value != document.form.v_password2.value){ showtext($("alert_msg"),"*<#File_Pop_content_alert_desc7#>"); document.form.http_passwd2.focus(); document.form.http_passwd2.select(); return false; } if(!blanktest(document.form.computer_name, "computer_name")){ document.form.computer_name.focus(); document.form.computer_name.select(); return false; } var re = new RegExp("[^a-zA-Z0-9 _-]+", "gi"); if(re.test(document.form.computer_name.value)){ alert("<#JS_validchar#>"); document.form.computer_name.focus(); document.form.computer_name.select(); return false; } if(!validate_string(document.form.ntp_server0)) return false; if(!validate_ipaddr_final(document.form.log_ipaddr, 'log_ipaddr')) return false; if(!validate_range(document.form.log_port, 1, 65535)) return false; if(document.form.http_passwd2.value.length > 0) alert("<#File_Pop_content_alert_desc10#>"); return true; } function done_validating(action){ refreshpage(); } function blanktest(obj, flag){ var value2 = eval("document.form."+flag+"2.value"); if(obj.value == ""){ if(value2 != "") obj.value = decodeURIComponent(value2); else obj.value = ""; alert("<#JS_Shareblanktest#>"); return false; } return true; } function openLink(s) { var link_params = "toolbar=yes,location=yes,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=640,height=480"; var tourl = "http://support.ntp.org/bin/view/Servers/WebHome"; link = window.open(tourl, "NTPLink", link_params); if (!link.opener) link.opener = self; } </script> <style> .table th, .table td{vertical-align: middle;} .table input, .table select {margin-bottom: 0px;} </style> </head> <body onload="initial();" onunLoad="return unload_body();"> <div class="wrapper"> <div class="container-fluid" style="padding-right: 0px"> <div class="row-fluid"> <div class="span3"><center><div id="logo"></div></center></div> <div class="span9" > <div id="TopBanner"></div> </div> </div> </div> <div id="Loading" class="popup_bg"></div> <iframe name="hidden_frame" id="hidden_frame" src="" width="0" height="0" frameborder="0"></iframe> <form method="post" name="form" id="ruleForm" action="/start_apply.htm" target="hidden_frame"> <input type="hidden" name="current_page" value="Advanced_System_Content.asp"> <input type="hidden" name="next_page" value=""> <input type="hidden" name="next_host" value=""> <input type="hidden" name="sid_list" value="LANHostConfig;General;Storage;"> <input type="hidden" name="group_id" value=""> <input type="hidden" name="action_mode" value=""> <input type="hidden" name="action_script" value=""> <input type="hidden" name="preferred_lang" id="preferred_lang" value="<% nvram_get_x("", "preferred_lang"); %>"> <input type="hidden" name="http_passwd" value=""> <input type="hidden" name="computer_name2" value="<% nvram_get_x("", "computer_name"); %>"> <div class="container-fluid"> <div class="row-fluid"> <div class="span3"> <!--Sidebar content--> <!--=====Beginning of Main Menu=====--> <div class="well sidebar-nav side_nav" style="padding: 0px;"> <ul id="mainMenu" class="clearfix"></ul> <ul class="clearfix"> <li> <div id="subMenu" class="accordion"></div> </li> </ul> </div> </div> <div class="span9"> <!--Body content--> <div class="row-fluid"> <div class="span12"> <div class="box well grad_colour_dark_blue"> <h2 class="box_head round_top"><#menu5_6#> - <#menu5_6_2#></h2> <div class="round_bottom"> <div class="row-fluid"> <div id="tabMenu" class="submenuBlock"></div> <div class="alert alert-info" style="margin: 10px;"><#Adm_System_desc#></div> <table width="100%" cellpadding="4" cellspacing="0" class="table"> <tr> <th colspan="2" style="background-color: #E3E3E3;"><#Adm_System_ident#></th> </tr> <tr> <th width="50%"> <a class="help_tooltip" href="javascript:void(0);" onmouseover="openTooltip(this,17,2);"><#ShareNode_DeviceName_itemname#></a> </th> <td> <input type="text" name="computer_name" id="computer_name" class="input" maxlength="15" size="32" value=""/> </td> </tr> <tr id="row_user" style="display:none"> <th><#Adm_System_admin#></th> <td> <input type="text" name="http_username" class="input" autocomplete="off" maxlength="32" size="25" value="<% nvram_get_x("","http_username"); %>" onKeyPress="return is_string(this,event);" /> </td> </tr> <tr id="row_pass1" style="display:none"> <th><a class="help_tooltip" href="javascript:void(0);" onmouseover="openTooltip(this,11,4)"><#PASS_new#></a></th> <td> <input type="password" name="http_passwd2" class="input" autocomplete="off" maxlength="32" size="25" onKeyPress="return is_string(this,event);"/> </td> </tr> <tr id="row_pass2" style="display:none"> <th><a class="help_tooltip" href="javascript:void(0);" onmouseover="openTooltip(this,11,4)"><#PASS_retype#></a></th> <td> <input type="password" name="v_password2" class="input" autocomplete="off" maxlength="32" size="25" onKeyPress="return is_string(this,event);"/><br/><span id="alert_msg"></span> </td> </tr> </table> <table width="100%" cellpadding="4" cellspacing="0" class="table"> <tr> <th colspan="2" style="background-color: #E3E3E3;"><#General_x_SystemTime_itemname#></th> </tr> <tr> <th width="50%"><a class="help_tooltip" href="javascript:void(0);" onmouseover="openTooltip(this,11,2)"><#LANHostConfig_x_TimeZone_itemname#></a></th> <td> <select name="time_zone" class="input" onchange="return change_common(this, 'LANHostConfig', 'time_zone')"> <option value="UCT12" <% nvram_match_x("","time_zone", "UCT12","selected"); %> >(GMT-12:00) <#TZ01#></option> <option value="UCT11" <% nvram_match_x("","time_zone", "UCT11","selected"); %> >(GMT-11:00) <#TZ02#></option> <option value="UCT10" <% nvram_match_x("","time_zone", "UCT10","selected"); %> >(GMT-10:00) <#TZ03#></option> <option value="NAST9NADT" <% nvram_match_x("","time_zone", "NAST9NADT","selected"); %> >(GMT-09:00) <#TZ04#></option> <option value="PST8PDT" <% nvram_match_x("","time_zone", "PST8PDT","selected"); %> >(GMT-08:00) <#TZ05#></option> <option value="MST7_1" <% nvram_match_x("","time_zone", "MST7_1","selected"); %> >(GMT-07:00) <#TZ06#></option> <option value="MST7" <% nvram_match_x("","time_zone", "MST7","selected"); %> >(GMT-07:00) <#TZ07#></option> <option value="MST7MDT" <% nvram_match_x("","time_zone", "MST7MDT","selected"); %> >(GMT-07:00) <#TZ08#></option> <option value="CST6CDT_1" <% nvram_match_x("","time_zone", "CST6CDT_1","selected"); %> >(GMT-06:00) <#TZ09#></option> <option value="CST6" <% nvram_match_x("","time_zone", "CST6","selected"); %> >(GMT-06:00) <#TZ10#></option> <option value="CST6CDT_3" <% nvram_match_x("","time_zone", "CST6CDT_3","selected"); %> >(GMT-06:00) <#TZ11#></option> <option value="CST6CDT_3_1" <% nvram_match_x("","time_zone", "CST6CDT_3_1","selected"); %> >(GMT-06:00) <#TZ12#></option> <option value="UCT6" <% nvram_match_x("","time_zone", "UCT6","selected"); %> >(GMT-06:00) <#TZ13#></option> <option value="EST5EDT" <% nvram_match_x("","time_zone", "EST5EDT","selected"); %> >(GMT-05:00) <#TZ14#></option> <option value="UCT5_1" <% nvram_match_x("","time_zone", "UCT5_1","selected"); %> >(GMT-05:00) <#TZ15#></option> <option value="UCT5_2" <% nvram_match_x("","time_zone", "UCT5_2","selected"); %> >(GMT-05:00) <#TZ16#></option> <option value="AST4ADT" <% nvram_match_x("","time_zone", "AST4ADT","selected"); %> >(GMT-04:00) <#TZ17#></option> <option value="UCT4_1" <% nvram_match_x("","time_zone", "UCT4_1","selected"); %> >(GMT-04:00) <#TZ18#></option> <option value="UCT4_2" <% nvram_match_x("","time_zone", "UCT4_2","selected"); %> >(GMT-04:00) <#TZ19#></option> <option value="NST3.30NDT" <% nvram_match_x("","time_zone", "NST3.30NDT","selected"); %> >(GMT-03:30) <#TZ20#></option> <option value="BRT3BRST" <% nvram_match_x("","time_zone", "BRT3BRST","selected"); %> >(GMT-03:00) <#TZ21#></option> <option value="UCT3" <% nvram_match_x("","time_zone", "UCT3","selected"); %> >(GMT-03:00) <#TZ22#></option> <option value="EBST3EBDT_2" <% nvram_match_x("","time_zone", "EBST3EBDT_2","selected"); %> >(GMT-03:00) <#TZ23#></option> <option value="UCT2" <% nvram_match_x("","time_zone", "UCT2","selected"); %> >(GMT-02:00) <#TZ24#></option> <option value="EUT1EUTDST" <% nvram_match_x("","time_zone", "EUT1EUTDST","selected"); %> >(GMT-01:00) <#TZ25#></option> <option value="UCT1" <% nvram_match_x("","time_zone", "UCT1","selected"); %> >(GMT-01:00) <#TZ26#></option> <option value="GMT0BST_1" <% nvram_match_x("","time_zone", "GMT0BST_1","selected"); %> >(GMT) <#TZ27#></option> <option value="UCT" <% nvram_match_x("","time_zone", "UCT","selected"); %> >(GMT) <#TZ28#></option> <option value="CET-1CEST" <% nvram_match_x("","time_zone", "CET-1CEST","selected"); %> >(GMT+01:00) <#TZ29#></option> <option value="CET-1CEST_1" <% nvram_match_x("","time_zone", "CET-1CEST_1","selected"); %> >(GMT+01:00) <#TZ30#></option> <option value="CET-1CEST_2" <% nvram_match_x("","time_zone", "CET-1CEST_2","selected"); %> >(GMT+01:00) <#TZ31#></option> <option value="CET-1CEST_3" <% nvram_match_x("","time_zone", "CET-1CEST_3","selected"); %> >(GMT+01:00) <#TZ32#></option> <option value="MET-1METDST" <% nvram_match_x("","time_zone", "MET-1METDST","selected"); %> >(GMT+01:00) <#TZ33#></option> <option value="MET-1METDST_1" <% nvram_match_x("","time_zone", "MET-1METDST_1","selected"); %> >(GMT+01:00) <#TZ34#></option> <option value="MEZ-1MESZ" <% nvram_match_x("","time_zone", "MEZ-1MESZ","selected"); %> >(GMT+01:00) <#TZ35#></option> <option value="MEZ-1MESZ_1" <% nvram_match_x("","time_zone", "MEZ-1MESZ_1","selected"); %> >(GMT+01:00) <#TZ36#></option> <option value="UCT-1_3" <% nvram_match_x("","time_zone", "UCT-1_3","selected"); %> >(GMT+01:00) <#TZ37#></option> <option value="EET-2EETDST_2" <% nvram_match_x("","time_zone", "EET-2EETDST_2","selected"); %> >(GMT+02:00) <#TZ38#></option> <option value="EST-2EDT" <% nvram_match_x("","time_zone", "EST-2EDT","selected"); %> >(GMT+02:00) <#TZ39#></option> <option value="EET-2EETDST_1" <% nvram_match_x("","time_zone", "EET-2EETDST_1","selected"); %> >(GMT+02:00) <#TZ40#></option> <option value="EET-2EETDST_3" <% nvram_match_x("","time_zone", "EET-2EETDST_3","selected"); %> >(GMT+02:00) <#TZ41#></option> <option value="IST-2IDT" <% nvram_match_x("","time_zone", "IST-2IDT","selected"); %> >(GMT+02:00) <#TZ42#></option> <option value="SAST-2" <% nvram_match_x("","time_zone", "SAST-2","selected"); %> >(GMT+02:00) <#TZ43#></option> <option value="EET-2EETDST" <% nvram_match_x("","time_zone", "EET-2EETDST","selected"); %> >(GMT+02:00) <#TZ43_2#></option> <option value="UTC-2" <% nvram_match_x("","time_zone", "UTC-2","selected"); %> >(GMT+02:00) <#TZ43_3#></option> <option value="UTC-3" <% nvram_match_x("","time_zone", "UTC-3","selected"); %> >(GMT+03:00) <#TZ44#></option> <option value="UCT-3_1" <% nvram_match_x("","time_zone", "UCT-3_1","selected"); %> >(GMT+03:00) <#TZ46#></option> <option value="UCT-3_2" <% nvram_match_x("","time_zone", "UCT-3_2","selected"); %> >(GMT+03:00) <#TZ47#></option> <option value="IST-3IDT" <% nvram_match_x("","time_zone", "IST-3IDT","selected"); %> >(GMT+03:00) <#TZ48#></option> <option value="UCT-3.30" <% nvram_match_x("","time_zone", "UCT-3.30","selected"); %> >(GMT+03:30) <#TZ49#></option> <option value="UTC-4" <% nvram_match_x("","time_zone", "UTC-4","selected"); %> >(GMT+04:00) <#TZ45#></option> <option value="UCT-4_1" <% nvram_match_x("","time_zone", "UCT-4_1","selected"); %> >(GMT+04:00) <#TZ50#></option> <option value="UCT-4_2" <% nvram_match_x("","time_zone", "UCT-4_2","selected"); %> >(GMT+04:00) <#TZ51#></option> <option value="UCT-4.30" <% nvram_match_x("","time_zone", "UCT-4.30","selected"); %> >(GMT+04:30) <#TZ52#></option> <option value="UTC-5" <% nvram_match_x("","time_zone", "UTC-5","selected"); %> >(GMT+05:00) <#TZ53#></option> <option value="UCT-5" <% nvram_match_x("","time_zone", "UCT-5","selected"); %> >(GMT+05:00) <#TZ54#></option> <option value="UCT-5.30" <% nvram_match_x("","time_zone", "UCT-5.30","selected"); %> >(GMT+05:30) <#TZ59#></option> <option value="UCT-5.30_2" <% nvram_match_x("","time_zone", "UCT-5.30_2","selected"); %> >(GMT+05:30) <#TZ55#></option> <option value="UCT-5.30_1" <% nvram_match_x("","time_zone", "UCT-5.30_1","selected"); %> >(GMT+05:30) <#TZ56#></option> <option value="UCT-5.45" <% nvram_match_x("","time_zone", "UCT-5.45","selected"); %> >(GMT+05:45) <#TZ57#></option> <option value="UTC-6_1" <% nvram_match_x("","time_zone", "UTC-6_1","selected"); %> >(GMT+06:00) <#TZ60_2#></option> <option value="UCT-6" <% nvram_match_x("","time_zone", "UCT-6","selected"); %> >(GMT+06:00) <#TZ58#></option> <option value="UCT-6.30" <% nvram_match_x("","time_zone", "UCT-6.30","selected"); %> >(GMT+06:30) <#TZ61#></option> <option value="UTC-7_1" <% nvram_match_x("","time_zone", "UTC-7_1","selected"); %> >(GMT+07:00) <#TZ60#></option> <option value="UTC-7" <% nvram_match_x("","time_zone", "UTC-7","selected"); %> >(GMT+07:00) <#TZ63#></option> <option value="UCT-7" <% nvram_match_x("","time_zone", "UCT-7","selected"); %> >(GMT+07:00) <#TZ62#></option> <option value="UTC-8" <% nvram_match_x("","time_zone", "UTC-8","selected"); %> >(GMT+08:00) <#TZ69#></option> <option value="UTC-8_1" <% nvram_match_x("","time_zone", "UTC-8_1","selected"); %> >(GMT+08:00) <#TZ69_2#></option> <option value="CST-8" <% nvram_match_x("","time_zone", "CST-8","selected"); %> >(GMT+08:00) <#TZ64#></option> <option value="CST-8_1" <% nvram_match_x("","time_zone", "CST-8_1","selected"); %> >(GMT+08:00) <#TZ65#></option> <option value="SST-8" <% nvram_match_x("","time_zone", "SST-8","selected"); %> >(GMT+08:00) <#TZ66#></option> <option value="CCT-8" <% nvram_match_x("","time_zone", "CCT-8","selected"); %> >(GMT+08:00) <#TZ67#></option> <option value="WAS-8WAD" <% nvram_match_x("","time_zone", "WAS-8WAD","selected"); %> >(GMT+08:00) <#TZ68#></option> <option value="UTC-9" <% nvram_match_x("","time_zone", "UTC-9","selected"); %> >(GMT+09:00) <#TZ72#></option> <option value="UCT-9_1" <% nvram_match_x("","time_zone", "UCT-9_1","selected"); %> >(GMT+09:00) <#TZ70#></option> <option value="JST" <% nvram_match_x("","time_zone", "JST","selected"); %> >(GMT+09:00) <#TZ71#></option> <option value="CST-9.30CDT" <% nvram_match_x("","time_zone", "CST-9.30CDT","selected"); %> >(GMT+09:30) <#TZ73#></option> <option value="UCT-9.30" <% nvram_match_x("","time_zone", "UCT-9.30","selected"); %> >(GMT+09:30) <#TZ74#></option> <option value="UTC-10" <% nvram_match_x("","time_zone", "UTC-10","selected"); %> >(GMT+10:00) <#TZ78#></option> <option value="EST-10EDT" <% nvram_match_x("","time_zone", "EST-10EDT","selected"); %> >(GMT+10:00) <#TZ75#></option> <option value="UCT-10_2" <% nvram_match_x("","time_zone", "UCT-10_2","selected"); %> >(GMT+10:00) <#TZ76#></option> <option value="TST-10TDT" <% nvram_match_x("","time_zone", "TST-10TDT","selected"); %> >(GMT+10:00) <#TZ77#></option> <option value="UCT-10_5" <% nvram_match_x("","time_zone", "UCT-10_5","selected"); %> >(GMT+10:00) <#TZ79#></option> <option value="UTC-11" <% nvram_match_x("","time_zone", "UTC-11","selected"); %> >(GMT+11:00) <#TZ80_2#></option> <option value="UCT-11" <% nvram_match_x("","time_zone", "UCT-11","selected"); %> >(GMT+11:00) <#TZ80#></option> <option value="UCT-11_1" <% nvram_match_x("","time_zone", "UCT-11_1","selected"); %> >(GMT+11:00) <#TZ81#></option> <option value="UTC-12" <% nvram_match_x("","time_zone", "UTC-12","selected"); %> >(GMT+12:00) <#TZ81_2#></option> <option value="UCT-12" <% nvram_match_x("","time_zone", "UCT-12","selected"); %> >(GMT+12:00) <#TZ82#></option> <option value="NZST-12NZDT" <% nvram_match_x("","time_zone", "NZST-12NZDT","selected"); %> >(GMT+12:00) <#TZ83#></option> <option value="UCT-13" <% nvram_match_x("","time_zone", "UCT-13","selected"); %> >(GMT+13:00) <#TZ84#></option> </select> <span id="timezone_hint" style="display:none;"></span> </td> </tr> <tr> <th><#Adm_System_ntpp#></th> <td> <select name="ntp_period" class="input"> <option value="6" <% nvram_match_x("","ntp_period", "6","selected"); %>>6 hours</option> <option value="12" <% nvram_match_x("","ntp_period", "12","selected"); %>>12 hours</option> <option value="24" <% nvram_match_x("","ntp_period", "24","selected"); %>>1 day (*)</option> <option value="48" <% nvram_match_x("","ntp_period", "48","selected"); %>>2 days</option> <option value="72" <% nvram_match_x("","ntp_period", "72","selected"); %>>3 days</option> <option value="168" <% nvram_match_x("","ntp_period","168","selected"); %>>1 week</option> <option value="336" <% nvram_match_x("","ntp_period","336","selected"); %>>2 weeks</option> <option value="0" <% nvram_match_x("","ntp_period", "0","selected"); %>><#btn_Disable#></option> </select> </td> </tr> <tr> <th><a class="help_tooltip" href="javascript:void(0);" onmouseover="openTooltip(this,11,3)"><#LANHostConfig_x_NTPServer1_itemname#> 1:</a></th> <td> <input type="text" maxlength="128" class="input" size="32" name="ntp_server0" value="<% nvram_get_x("","ntp_server0"); %>" onKeyPress="return is_string(this,event);"/> <a href="javascript:openLink('x_NTPServer1')" class="label label-info" name="x_NTPServer1_link"><#LANHostConfig_x_NTPServer1_linkname#></a> </td> </tr> <tr> <th><a class="help_tooltip" href="javascript:void(0);" onmouseover="openTooltip(this,11,3)"><#LANHostConfig_x_NTPServer1_itemname#> 2:</a></th> <td> <input type="text" maxlength="128" class="input" size="32" name="ntp_server1" value="<% nvram_get_x("","ntp_server1"); %>" onKeyPress="return is_string(this,event);"/> </td> </tr> </table> <table width="100%" cellpadding="4" cellspacing="0" class="table"> <tr> <th colspan="2" style="background-color: #E3E3E3;"><#t2Misc#></th> </tr> <tr> <th width="50%"><a class="help_tooltip" href="javascript:void(0);" onmouseover="openTooltip(this,11,1)"><#LANHostConfig_x_ServerLogEnable_itemname#></a></th> <td> <input type="text" maxlength="15" class="input" size="15" name="log_ipaddr" style="width: 145px" value="<% nvram_get_x("", "log_ipaddr"); %>" onKeyPress="return is_ipaddr(this,event);" /> : <input type="text" maxlength="5" class="input" size="10" name="log_port" style="width: 44px;" value="<% nvram_get_x("","log_port"); %>" onkeypress="return is_number(this,event);"/> </td> </tr> <tr> <th><#Adm_System_logf#></th> <td> <select name="log_float_ui" class="input"> <option value="0" <% nvram_match_x("", "log_float_ui", "0","selected"); %>><#checkbox_No#></option> <option value="1" <% nvram_match_x("", "log_float_ui", "1","selected"); %>><#checkbox_Yes#> (*)</option> <option value="2" <% nvram_match_x("", "log_float_ui", "2","selected"); %>><#Adm_System_logf_item2#></option> </select> </td> </tr> <tr> <th><#PASS_LANG#></th> <td> <select name="select_lang" id="select_lang" onchange="submit_language();"> <% shown_language_option(); %> </select> </td> </tr> <tr> <th><#Adm_System_help#></th> <td> <div class="main_itoggle"> <div id="help_enable_on_of"> <input type="checkbox" id="help_enable_fake" <% nvram_match_x("General", "help_enable", "1", "value=1 checked"); %><% nvram_match_x("General", "help_enable", "0", "value=0"); %>> </div> </div> <div style="position: absolute; margin-left: -10000px;"> <input type="radio" name="help_enable" id="help_enable_1" class="input" value="1" <% nvram_match_x("General", "help_enable", "1", "checked"); %>/><#checkbox_Yes#> <input type="radio" name="help_enable" id="help_enable_0" class="input" value="0" <% nvram_match_x("General", "help_enable", "0", "checked"); %>/><#checkbox_No#> </div> </td> </tr> </table> <table class="table"> <tr> <td style="border: 0 none;"> <center><input class="btn btn-primary" style="width: 219px" onclick="applyRule();" type="button" value="<#CTL_apply#>" /></center> </td> </tr> </table> </div> </div> </div> </div> </div> </div> </div> </div> </form> <div id="footer"></div> </div> </body> </html> 这个代码里面的ntp服务器是哪个接口获取出来的
12-06
完整代码如下 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ page import="com.sjsemi.prms.constants.*" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="zh-CN"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title><%=Global.WEB_TITLE %> </title> <% request.setCharacterEncoding("UTF-8"); %> <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <link rel="stylesheet" type="text/css" href="lib/bootstrap/css/bootstrap.css"> <link rel="stylesheet" type="text/css" href="custom/global.css"> <link rel="stylesheet" type="text/css" href="stylesheets/theme.css"> <link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css"> <link rel="stylesheet" type="text/css" href="stylesheets/jquery-ui.css"> <script src="lib/jquery-1.7.2.min.js" type="text/javascript"></script> <script src="lib/jquery-ui-1.10.4.js" type="text/javascript"></script> <style type="text/css"> .brand { font-family: georgia, serif; } .brand .first { color: #FF5C0D; font-style: italic; } .brand .second { color: #fff; font-weight: bold; } .table td { padding: 5px; line-height: 20px; border-top: 1px solid #dddddd; } </style> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="lib/html5.js"></script> <![endif]--> <!-- Le fav and touch icons --> <link rel="shortcut icon" href="../assets/ico/favicon.ico"> </head> <% String scanIdType = FormatUtils.parseString(request.getParameter("scanIdType")); %> <body> <%@ include file="navBar.jsp" %> <%@ include file="sideBar.jsp" %> <div class="content"> <div class="header"> <h1 class="page-title">Tally</h1> </div> <div class="container-fluid"> <div class="raw-fluid"> <div class="block span6" style="width: 100%;"> <a href="#tablewidget" class="block-heading" data-toggle="collapse">Search</a> <div id="tablewidget" class="block-body collapse in"> <form id="frmQuery"> <input type="hidden" name="pageIndex"/> <table class="table"> <thead> <tr> <td style="width: 10%">Scan ID:</td> <td><input type="text" style="width: 130px;" id="scanId" name="scanId" autocomplete="off"></td> <td style="width: 10%">Scan Id 类型:</td> <td colspan="3" style="text-align: left;"><select name="scanIdType"> </select></td> <td style="width: 10%">Rack ID:</td> <td><input type="text" style="width: 130px;" id="rackId" name="rackId" readonly/></td> <td><input type="text" id="countId" name="countId" style="color: red; font-size: 14px; width: 50px;" value="0" readonly/></td> <td style="width: 30%"></td> </thead> </table> </form> </div> </div> </div> </div> <div class="container-fluid"> <form id="frmResult" action="<%=Page.TD_MATERIAL_INFO%>"> <div class="raw-fluid"> <div class="block span6" style="width: 100%;"> <div> <a href="#tablewidget1" class="block-heading" data-toggle="collapse">Search Result List</a> </div> <div id="tablewidget1" class="block-body collapse in" style="width: 100%;"> <table border="1" cellpadding="10" style="width: 99%;" id="searchResult"> <thead> <tr> <th rowspan="2"></th> <th rowspan="2">Cabinet ID</th> <th rowspan="2">Scan ID</th> </tr> </thead> <tbody id="q"></tbody> </tbody> </table> <div style="text-align: center;"> <button id="btn_submit" style="display:none;" type="button" class="btn btn-primary" onclick="saveRackLot();">Submit </button> </div> </div> </div> </div> </form> </div> </div> <script src="lib/bootstrap/js/bootstrap.js"></script> <script language="Javascript"> $(document).ready(function () { $("#frmQuery select[name='scanIdType']").val('<%=scanIdType %>'); setScanIdType(); }); var sequence = 1; window.onload = function () { document.getElementById("scanId").focus(); } document.onkeydown = function enterserach() { if (isEnter(event)) { checkLotInfo(); } } function isEnter(e) { var keynum = 0; if (window.event) // IE { keynum = e.keyCode } else if (e.which) // Netscape/Firefox/Opera { keynum = e.which } if (keynum == 13) { return true; } else { return false; } } function trim(str) { return str.replace(/\s+/g, ""); } function getScanIdTypeDisplayName(value) { var map = { "LOTID": "Lot ID", "WAFERID": "Wafer ID", "REELID": "Reel ID", "CARRIERID": "Carrier ID", "SCANID": "Scan ID" }; return map[value] || value; } function setScanIdType() { $.ajax({ type: "POST", url: "RmsAction?accessMethod=<%=AccessMethod.AJAX %>", data: { 'actionCode': '<%=ActionCode.GET_RMS_SCAN_ID_TYPE %>', }, dataType: "json", success: function (data) { if (data.return_code == "0") { var values = data.return_value.split(','); var selectBox = $("select[name='scanIdType']"); selectBox.empty(); // 清空原有选项 // 遍历数组,生成下拉选项 $.each(values, function (index, value) { var displayName = getScanIdTypeDisplayName(value); selectBox.append( $("<option></option>") .attr("value", value) .text(displayName || value) ); }); getRmsConfig(values[0]); // 绑定 change 事件,动态加载配置 selectBox.on('change', function () { var selectedType = $(this).val(); $("#savedScanIdType").val(selectedType); // 保存当前选择 getRmsConfig(selectedType); }); } }, error: function () { alert("Ajax HTTP访问失败, 请联系IT处理!"); } }); } // 全局变量,用于存储从后台获取的配置 var lotIdConfig = { rackIdKeyword: null, lengthRequirement: 16 }; // 获取 RMS 配置 function getRmsConfig(rmsType) { let hasRackIdConfig = false; var scanIdInput = document.getElementById("scanId"); // 清除旧的配置 lotIdConfig.rackIdKeyword = null; lotIdConfig.lengthRequirement = 16; $.ajax({ type: "POST", url: "RmsAction?accessMethod=<%=AccessMethod.AJAX %>", data: { 'actionCode': '<%=ActionCode.GET_RMS_CONFIG_LIST %>', 'rmsType': rmsType }, dataType: "json", success: function (data) { if (data.return_code == "0") { if (data.return_value.length == 0) { alert("请在RMS配置维护中维护RMS配置名称:RACKID的条件!"); if (scanIdInput) scanIdInput.disabled = true; return; } // 更新全局配置 for (var i = 0; i < data.return_value.length; i++) { var item = data.return_value[i]; if (item.key === "LENGTH") { if (item.value === undefined || item.value === null || item.value === "NA") { lotIdConfig.lengthRequirement = 16; } else { var parsedValue = parseInt(item.value, 10); lotIdConfig.lengthRequirement = isNaN(parsedValue) ? 16 : parsedValue; } } else if (item.key === "CONTAIN") { hasRackIdConfig = true; lotIdConfig.rackIdKeyword = item.value; if (scanIdInput) scanIdInput.disabled = false; } } if (!hasRackIdConfig) { alert("请在RMS配置维护中维护RACKID的包含条件!"); if (scanIdInput) scanIdInput.disabled = true; } } else { alert(data.return_value); } }, error: function () { alert("Ajax HTTP访问失败, 请联系IT处理!"); } }); } var j = 1; function checkLotInfo() { var lotIdObj = document.getElementById("scanId"); lotId = trim(lotIdObj.value.toUpperCase()); if (lotId.length == 0) return; var rackIdObj = document.getElementById("rackId"); rackId = trim(rackIdObj.value.toUpperCase()); var objTable = document.getElementById("searchResult"); var rackIdKeyword = lotIdConfig.rackIdKeyword; var lengthRequirement = lotIdConfig.lengthRequirement; if (lotId.indexOf(rackIdKeyword) >= 0) { if (lotId.length === lengthRequirement) { rackIdObj.value = lotId; lotIdObj.value = ''; lotIdObj.focus(); } else { alert("库位当前不满足" + lengthRequirement + "码!"); lotIdObj.value = ''; lotIdObj.focus(); return; } } else { document.getElementById("btn_submit").style.display = ""; lotIdObj.value = ''; lotIdObj.focus(); var countIdObj = document.getElementById("countId"); countIdObj.value = objTable.rows.length; q.innerHTML = q.innerHTML + '<tr id="button' + j + '"><td style="width: 60px;text-align: center;">' + '<button type="button" class="btn btn-primary" id=' + j + ' onclick="removeLot(this);" >Remove</button></td>' + '<td style="width: 60px;text-align: center;" id="rackId' + j + '" Name="rackId" >' + rackId + '</td>' + '<td style="width: 60px;text-align: center;" id="scanId' + j + '" Name="scanId" >' + lotId + '</td></tr>'; j++; } } function removeLot(obj) { var tb = document.getElementById("searchResult"); var id = obj.id; var row = document.getElementById("button" + id); var index = row.rowIndex; tb.deleteRow(index); var countIdObj = document.getElementById("countId"); countIdObj.value = tb.rows.length - 1; } function saveRackLot() { //获取循环次数 var countId = document.getElementById("countId").value; var count = parseInt(countId); //判断次数 var isCount = parseInt(0); var strs1 = []; var strs2 = []; for (i = 1; i <= count; i++) { var scanId = ""; var rackId = ""; var searchResult = document.getElementById("searchResult"); var rows = searchResult.rows;//获取所有行 for (var i = 1; i < rows.length; i++) { var row = rows[i];//获取每一行 scanId = row.cells[1].id; rackId = row.cells[2].id; var scanIds = document.getElementById(rackId).innerHTML; var rackIds = document.getElementById(scanId).innerHTML; strs1 = strs1 + "," + scanIds; strs2 = strs2 + "," + rackIds; isCount++ } } if (count > 0) { if (isCount == count) { $.ajax({ type: "POST", url: "RmsAction?accessMethod=<%=AccessMethod.AJAX %>", data: { 'actionCode': '<%=ActionCode.CREATE_RMS_LOT %>', 'scanId': strs1, 'rackId': strs2, 'count': count }, dataType: "json", success: function (data) { if (data.return_code == "0") { alert(data.return_value); location.reload(); } else { alert(data.return_value); } }, error: function () { alert("Ajax HTTP访问失败, 请联系IT处理!"); $('#butSend').attr("disabled", false); } }); } } else { alert("请输入数据后再提交!") } } </script> </body> </html> 现在还是不能把 Scan Id 类型 变成选择的内容 因为setScanIdType吧?
最新发布
12-11
请分析下面代码: <html> <head> <meta http-equiv="Expires" CONTENT="0"> <meta http-equiv="Cache-Control" CONTENT="no-cache"> <meta http-equiv="Pragma" CONTENT="no-cache"> <title>MIT ERC_V3.6.3</title> <link rel="stylesheet" href="/erc/css/tigris.css" type="text/css" /> <link rel="stylesheet" href="/erc/css/inst.css" type="text/css" /> <link rel="stylesheet" href="/erc/css/datepicker.css" type="text/css" /> <link rel="stylesheet" href="/erc/js/sortable/sortabletable.css" type="text/css" /> <script type="text/javascript" src="/erc/js/datepicker.js"></script> <script type="text/javascript" src="/erc/js/buttonstyle.js"></script> <script type="text/javascript" src="/erc/js/stringutil.js"></script> <script type="text/javascript" src="/erc/js/openwindow.js"></script> <script type="text/javascript" src="/erc/js/sortable/sortabletable.js"></script> <script type="text/javascript" src="/erc/js/filterlist.js"></script> <script type="text/javascript" src="/erc/js/prototype.js"></script> <script type="text/javascript" src="/erc/js/xmlextras.js"></script> <!--script language="javascript" src="http://10.222.4.104:6006/ese/js/ese.js"></script> <script language="javascript" src="http://10.222.4.104:6006/ese/js/xml2json.js"></script--> <!--script src="/erc/dwr/engine.js"></script> <script src="/erc/dwr/util.js"></script> <script src="/erc/dwr/interface/checkSTRNoService.js"></script--> </head> <body marginwidth="0" marginheight="0" onkeydown="if(event.keyCode=='13') return false;" class="composite" > <script> function getHoldLotInfo(){ checkRuncardStatus(); //if(checkRuncardStatus()){ var form = document.forms['updateRequestForm']; var lotId = form.elements["requestForm.lotId"].value; var holdStepNo= form.elements["requestForm.holdStepNo"].value; if(lotId==""){alert("Please key-in one LotId");return false;} if(holdStepNo==""){ form.action="updateHoldLotInfo.action"; checkboxSync();form.submit();alert("Please key-in Hold Step No#:");} if (lotId.indexOf(" ")>0){alert("Lot Id is not allowed space!"); return false;} form.action="updateHoldLotInfo.action"; checkboxSync();form.submit(); //} } function EndQtimeHanle(id){ //alert (id); var QtimeHanle = document.getElementById("EndQtimeHanle"+id); var sQtimeHanle = QtimeHanle.options[QtimeHanle.selectedIndex].text; //alert(sQtimeHanle); var tObj = document.getElementById("allEndQtimeHandle"); var allEndQtimeHandle= tObj.value; //alert (allEndQtimeHandle); if (allEndQtimeHandle==""){ //alert(1); tObj.value = id +","+ sQtimeHanle+ ";"; }else{ //alert(2) //alert (allEndQtimeHandle.indexOf(id+",")); if (allEndQtimeHandle.indexOf(id+",")>=0){ //alert ("Replace"); allEndQtimeHandle=allEndQtimeHandle.replace(id +",;",id +","+ sQtimeHanle+ ";"); //alert ("Replace 1:"+allEndQtimeHandle ); allEndQtimeHandle=allEndQtimeHandle.replace(id +",Mapping;",id +","+ sQtimeHanle+ ";"); //alert ("Replace 2:"+allEndQtimeHandle ); allEndQtimeHandle=allEndQtimeHandle.replace(id +",Ignore;",id +","+ sQtimeHanle+ ";"); //alert ("Replace 3:"+allEndQtimeHandle ); allEndQtimeHandle=allEndQtimeHandle.replace(id +",NULL;",id +","+ sQtimeHanle+ ";"); //alert ("Replace 3:"+allEndQtimeHandle ); tObj.value = allEndQtimeHandle; }else{ //alert (2); tObj.value = allEndQtimeHandle +id +","+ sQtimeHanle+ ";" } } } </script> <textarea id="_HIDDEN_TABLE_SPAN_STEPFORM" style="display:none"> <script> function updateWaferGroupResult(){ var form = document.forms['updateRequestForm']; form.action="updateWaferGroupResult.action"; form.submit(); } </script> <table border="0" cellspacing="1" cellpadding="8" width="100%"> </table> <table border="0" cellspacing="1" cellpadding="8" width="100%"> <tr class="a"> <td>Fab Area:</td> <td> FABJ1A </td> <td>NA<input type="checkbox" disabled="true"> Step No:                    01600</td> <td></td> </tr> <tr class="b"> <a name="1"> <td>Area:</td> <td >YE&FQC</td> <td>Check With RCP<input type="checkbox" disabled="true"></td> <td>Step Serial No:  <strong>1</strong></td> </tr> <tr class="b"> <td>Equipment:</td> <td colspan="3">Eqp Group: JME_MET_ET1</td> </tr> <tr class="b"> <td>Recipe:</td> <td colspan="3">CPBET3KA</td> </tr> <tr class="b"> <td>Wafer ID:</td> <td colspan="2">#02,#03,#04,#05,#06,#07,#08,#09,#10,#11,#12,#13,#14,#15,#16,#17,#18,#19,#20,#21,#22,#23,#24,#25</td><td>Qty.: 24</td> </tr> <tr class="b"> <td>Contamination Flag: </td> <td colspan="3">NA</td> </tr> <tr class="b"> <td colspan="4">实际下货Tools:</td> </tr> <tr class="b"> <td>Remark:</td> <td colspan="3">1</td> </tr> <tr> <td bgcolor="#87CEFF" colspan=9> <b> Qtime Configuration <font color="#0000FF">Start </font> at this Step in Mainflow,need setting after 'add the step': </b> </td> </tr> <tr > <td bgcolor="#DCDCDC" width=15% colspan=2><b>Qtime info:</b></td> <td bgcolor="#DCDCDC" colspan=7> <TABLE border=0 cellSpacing=1 cellSpacing=1 width="100%"> <TR> <TD >Plan ID </TD> <TD >Plan Ver </TD> <TD ><font color="#0000FF"><B><Red>StrStepSeq</font></TD> <TD >EndStepSeq</TD> <TD >IntervalTime</TD> <TD >ControlType</TD> <TD >ExpireAction</TD> <TD >mpsStepSeq</TD> </TR> <TR> <TD >JLF100UPI0L01</TD> <TD >15</TD> <TD ><font color="#0000FF"><B>01600</font></TD> <TD >01700</TD> <TD >60</TD> <TD >Max Time</TD> <TD >Hold Lot</TD> <TD ></TD> </TR> </Table> </td> </tr> </script> <tr bgcolor="#FFFFFF"> <td colspan="4"> </td></tr> <tr bgcolor="#FFFFFF"> <td colspan="4"> </td></tr> <tr class="b"> <td colspan="4"> <center> </center> </td> </tr> </table> <table border="0" cellspacing="1" cellpadding="8" width="100%"> <script> function doQTime(groupResult){ var form = document.forms['updateRequestForm']; form.action="comeinQTime.action?method=fromMainPage&groupResultId="+groupResult; form.submit(); } function doMainFlowQTime(groupResult){ var form = document.forms['updateRequestForm']; form.action="comeinMainFlowQTime.action?method=fromMainPage&groupResultId="+groupResult; form.submit(); } </script> <tr class="b"> <th colspan="4">Group Result</th> </tr> <tr class="b"> <td colspan="4"> <table border="0" cellspacing="1" cellpadding="8" width="100%"> <input type="hidden" name="groupResults[0].id" value="113213" /> <tr class=odder> <td><b>Wafer List</b></td> <td colspan=2 align=left><b>Step List</b></td> <td colspan=2><b>QTime(m)</b></td> <td></td> </tr> <tr class=odder> <td>#02,#03,#04,#05,#06,#07,#08,#09,#10,#11,#12,#13,#14,#15,#16,#17,#18,#19,#20,#21,#22,#23,#24,#25</td> <td width=15% colspan=2 align=left>01</td> <td colspan=2> <table border="0" cellspacing="1" cellpadding="8" width="100%"> <tr><TD><B>Type:</B>Max Time <B>Period:</B>60 <B>From:</B>1 <B>To:</B>01700 <B>mpsStepSeq:</B> <B>Action:</B>Hold Lot</TD></tr> </table> </td> <td> <input type="button" name="btnAddQtime" value="AddQTime" onclick="doQTime('113213')" class="button"> <BR> <input type="button" name="btnAddMainFlowQtime" value="AddMainFlowQTime" onclick="doMainFlowQTime('113213')" class="button"> </td> </tr> </table> </td> </tr> </table> </textarea> <script> window.opener.document.getElementById("SPAN_STEPFORM").innerHTML = document.getElementById("_HIDDEN_TABLE_SPAN_STEPFORM").value; </script> <style type="text/css"> <!-- .TextBoxReadOnly { border:1px solid #C0C0C0; text-align:left; background-color:#D3D3D3; width:200px; readonly:expression(this.readOnly=true); } .TextBoxReadWrite { border:1px solid #C0C0C0; text-align:left; background-color:#FFFFFF; width:200px; readonly:expression(this.readOnly=false); } --> </style> <script> var area="normal"; window.onload=function(){ //opener.document.updateRequestForm.updateWaferGroupResultBtn.click(); var fabName=document.forms['stepForm'].elements["stepForm.fabName"].value; if((fabName=="FAB1" ||fabName=="FAB2") && area.indexOf("DIFF")!=-1){ document.getElementById("showRemark").style.display=''; } var area=document.forms['stepForm'].elements["stepForm.area"]; if('FABJ1A'=="S1" && 'Normal'=="Scan Defect" && area.value == ""){ if(fabName=="A"){ area.value="S1A-PHOTO-M"; } else if(fabName=="B"){ area.value="S1B-PHOTO-M"; } else if(fabName=="C"){ area.value="S1C-CMP"; } } } function checkboxSync(){ var stepForm=document.forms['stepForm']; if ( (typeof stepForm.elements["rcpCheck"]!= "undefined") && stepForm.elements["rcpCheck"].checked){ stepForm.elements["stepForm.RCP"].value="on"; }else{ stepForm.elements["stepForm.RCP"].value="uncheck"; } if ( (typeof stepForm.elements["noStepNoPar"]!= "undefined") && stepForm.elements["noStepNoPar"].checked){ stepForm.elements["stepForm.noStepNo"].value="on"; }else{ stepForm.elements["stepForm.noStepNo"].value="uncheck"; } } function changeShow(object){ var stepForm=document.forms['stepForm']; var fabName=object.value; if("Engineering"==fabName) { if(!confirm("请注意您现在选择使用的是engineer folder 下的recipe!")) { stepForm["stepForm.recipeType"][0].checked=true; stepForm.action="viewStepForm.action"; checkboxSync(); stepForm.submit(); } } if("Matrix"==fabName) { if(!confirm("请注意您现在选择的是FEM run模式!")) { stepForm["stepForm.batchType"][0].checked=true; return false; } } if(object.value=="") { alert("Please select the fab area!"); return false; } if((fabName=="FAB1" ||fabName=="FAB2") && area.indexOf("DIFF")!=-1) { document.getElementById("showRemark").style.display=''; } else { document.getElementById("showRemark").style.display='none'; } if("Engineering"==fabName || "Production"==fabName || "Matrix"==fabName) { if("Engineering"==fabName) stepForm.action="viewStepForm.action?stepForm.batchType=Production"; else if("Matrix"==fabName) stepForm.action="viewStepForm.action?stepForm.energyStep=&stepForm.focusStep="; else stepForm.action="viewStepForm.action"; } else stepForm.action="viewStepForm.action?command=&stepForm.area="; checkboxSync(); stepForm.submit(); } function restrictLength(object){ var stepForm=document.forms['stepForm']; var value=object.value; if(value=="Eqp ID") { alert("输入的Eqp ID 的最大长度为7位!"); } } function checkNA(object){ var stepForm=document.forms['stepForm']; var eqpName=stepForm.elements["stepForm.eqpModeName"].value; var value=object.value; if(eqpName=="DUMMY" ||eqpName.indexOf("DMY02")!=-1){ if(value!="NA"){ alert("EQPName is DUMMY.You must select the 'NA'!"); object[object.length-1].selected=true; return false; } } } function showOvl(){ window.open('showOvl.action','','left=0,top=200,width=760,height=200'); } function defalutValue(){ var stepForm=document.forms['stepForm']; var chk=stepForm.elements['rcpCheck']; var area=stepForm.elements['stepForm.area']; var trackOutRecipe= stepForm.elements["stepForm.trackOutRecipe"]; if(chk.checked==false) { alert("如果想指定Chamber去auto run,可以把“Check with RCP”前边的勾去掉,Recipe里填写recipe name_chamber list(或者中划线“-”)"); if(areaValue=="PHOTO" || areaValue=="S1A-PHOTO" || areaValue=="S1B-PHOTO" ||areaValue=="S1C-PHOTO" || areaValue=="M1A-PHOTO" || areaValue=="M1B-PHOTO" || areaValue=="M1C-PHOTO" || areaValue=="SXA-PHOTO" || areaValue=="SXC-PHOTO") trackOutRecipe.value="recipe name_chamber list"; else stepForm.elements["stepForm.recipe"].value="recipe name_chamber list"; } else { alert("请填写正确的Recipe"); if(areaValue=="PHOTO" || areaValue=="S1A-PHOTO" || areaValue=="S1B-PHOTO" ||areaValue=="S1C-PHOTO" || areaValue=="M1A-PHOTO" || areaValue=="M1B-PHOTO" || areaValue=="M1C-PHOTO" || areaValue=="SXA-PHOTO" || areaValue=="SXC-PHOTO") trackOutRecipe.value="waiting Pi_Run Result"; else stepForm.elements["stepForm.recipe"].value="waiting Pi_Run Result"; } } function clearSpec(){ var stepForm=document.forms['stepForm']; stepForm.elements['stepForm.spec'].value=""; } function showSpec(){ var stepForm=document.forms['stepForm']; //stepForm.elements['stepForm.spec'].value=""; var value= stepForm.elements['stepForm.ecdPlanName'].value; if(value==""){ alert("Please input the EdcPlan"); return false;} window.open('showSpec.action?requestFormId=113203&edcPlan=' + value + '','','status=no,scrollbars=yes,location=no,resizable=yes,left=0,top=200,width=760'); } function changeByArea(object){ var stepForm=document.forms['stepForm']; if($F("stepForm.fabName")==""){ alert("Please select the fab area !"); return false; } var value=object.value; var eqpId=stepForm.elements["stepForm.eqpMode"].value; var eqpValue=stepForm.elements["stepForm.eqpModeName"].value; if(eqpId=="Eqp ID"){ if(eqpValue=="dummy" ||eqpValue=="DUMMY" || eqpValue.indexOf("DMY02")!=-1){ //DMY02 for cension if(areaValue=="PHOTO" || areaValue=="S1A-PHOTO" || areaValue=="S1B-PHOTO" ||areaValue=="S1C-PHOTO" || areaValue=="M1A-PHOTO" || areaValue=="M1B-PHOTO" || areaValue=="M1C-PHOTO" || areaValue=="SXA-PHOTO" || areaValue=="SXC-PHOTO"){ alert("Please do not set area as PHOTO for DUMMY Eqp ID!") stepForm.elements["stepForm.area"].focus(); } } } stepForm.elements["stepForm.eqpModeName"].value=""; if(typeof stepForm.elements["stepForm.recipe"]!= "undefined") stepForm.elements["stepForm.recipe"].value=""; if(typeof stepForm.elements["stepForm.trackOutRecipe"]!= "undefined") stepForm.elements["stepForm.trackOutRecipe"].value=""; stepForm.action="changeArea.action?stepForm.recipeType=Production"; checkboxSync(); stepForm.submit(); } function changeValeuToNumber(object){ var objectValue=object.value; var pattern = /[^\d\.\+\-]/g; if(pattern.test(objectValue)){ alert("请输入正确的数字格式"); object.value=""; object.focus(); } if("energyStep"==object.id) {if( eval(objectValue)>1000 || eval(objectValue)<-1000.0) { alert("EnergyStep的范围在 (-1000~1000)."); object.value=""; object.focus(); } } if("focusStep"==object.id) {if( eval(objectValue)>2 || eval(objectValue)<-2) { alert("FocusStep的范围在 (-2~2)."); object.value=""; object.focus(); } } } function eqpToUpper(object){ var form = document.forms['stepForm']; var mode=form.elements["stepForm.eqpMode"].value; var areaValue=form.elements["stepForm.area"].value; var value=object.value; var reg=/\s/g; var stringLength=value.replace(reg,""); if(mode!="Eqp Group"){ object.value=stringLength.toUpperCase(); } if(mode=="Eqp ID"){ if(stringLength.length>7) {alert("最多7个字符!"); object.value=""; object.focus(); return false; } if(stringLength=="dummy" ||stringLength=="DUMMY" || stringLength.indexOf("DMY02")!=-1){ //DMY02 for cension if(areaValue=="PHOTO" || areaValue=="S1A-PHOTO" || areaValue=="S1B-PHOTO" ||areaValue=="S1C-PHOTO" || areaValue=="M1A-PHOTO" || areaValue=="M1B-PHOTO" || areaValue=="M1C-PHOTO" || areaValue=="SXA-PHOTO" || areaValue=="SXC-PHOTO"){ alert("Please do not set area as PHOTO for DUMMY Eqp ID!"); form.elements["stepForm.area"].focus(); return false; } if (typeof form.elements["stepForm.recipe"]!= "undefined"){ form.elements["stepForm.recipe"].value="DUMMY"; form.elements["stepForm.recipe"].className="TextBoxReadOnly"; // checkNA(form.elements['stepForm.contaminationFlag']); } }else if(typeof form.elements["stepForm.recipe"]!= "undefined") form.elements["stepForm.recipe"].className="TextBoxReadWrite"; } } function scannerToUpper(){ var form = document.forms['stepForm']; var element = form.elements["stepForm.scannerRecipe"]; element.value =element.value.toUpperCase(); } function trackToUpper(){ var form = document.forms['stepForm']; var element = form.elements["stepForm.trackOutRecipe"]; element.value =element.value.toUpperCase(); } function recipeToUpper(){ var form = document.forms['stepForm']; var element = form.elements["stepForm.recipe"]; element.value =element.value.toUpperCase(); } function getStepLotInfo(){ var form = document.forms['stepForm']; var chk= form.elements['rcpCheck']; var noStepNo= form.elements['noStepNoPar']; if (typeof form.elements["noStepNoPar"]!= "undefined"){ if (!noStepNo.checked && form.elements["stepForm.stepNo"].value==""){ alert("Please input step No."); form.elements["stepForm.stepNo"].focus(); return false; } if (noStepNo.checked && form.elements["stepForm.stepNo"].value!=""){ alert("Please unCheck NA."); return false; } } form.action="updateStepInfo.action?ercParams=true"; checkboxSync(); disableButton(); form.submit(); } function checkBoxValue(param){ var returnPara=param; var form = document.forms['stepForm']; var chk= form.elements['rcpCheck']; var noStepNo= form.elements['noStepNoPar']; if (typeof form.elements["noStepNoPar"]!= "undefined"){ } return returnPara; } function checkPageToSubmit(){ var form = document.forms['stepForm']; var chk= form.elements['rcpCheck']; var noStepNo= form.elements['noStepNoPar']; var eqpID=$F("stepForm.eqpMode"); var eqpIDValue=$F("stepForm.eqpModeName"); var areaValue=$F("stepForm.area"); var stepNo=form.elements["stepForm.stepNo"]; if (typeof form.elements["noStepNoPar"]!= "undefined"){ var elementMes = form.elements["stepForm.stepNoMes"].value; var element = form.elements["stepForm.stepNo"].value; if (elementMes==null || element!=elementMes){ alert("Please click [go] to get MES information."); form.elements["stepForm.stepNo"].focus(); return false; } } EndQtimeHanle(113228); if((eqpIDValue=="dummy" || eqpIDValue=="DUMMY")&& (areaValue=="PHOTO" || areaValue=="S1A-PHOTO" || areaValue=="S1B-PHOTO" ||areaValue=="S1C-PHOTO" || areaValue=="M1A-PHOTO" || areaValue=="M1B-PHOTO" || areaValue=="M1C-PHOTO" || areaValue=="SXA-PHOTO" || areaValue=="SXC-PHOTO") && eqpID=="Eqp ID"){ alert("Please do not set area as PHOTO for DUMMY Eqp ID!"); $("stepForm.area").focus(); return false; } if (typeof form.elements["noStepNoPar"]!= "undefined"){ if (!noStepNo.checked && form.elements["stepForm.stepNo"].value==""){ alert("Please input step No."); form.elements["stepForm.stepNo"].focus(); return false; } if (noStepNo.checked && form.elements["stepForm.stepNo"].value!=""){ alert("Please unCheck NA."); return false; } } if(form.elements['stepForm.slotId'].value!="") { if(form.elements['stepForm.ecdPlanName'].value=="") {alert("Please Input Corrective EDC Plan Name!"); form.elements['stepForm.ecdPlanName'].focus(); return false;} } if(form.elements['stepForm.ecdPlanName'].value!="") { if(form.elements['stepForm.slotId'].value=="") { alert("Please select SlotId!"); return false; } else { if(!checkWaferIdIsEqualSlotId(form)){ alert("Meas slot id is not in wafer id list"); return false; } } } if (typeof form.elements["stepForm.spec"]!= "undefined"){ var element = form.elements["stepForm.spec"].value; if (element==""&&form.elements['stepForm.slotId'].value!=""){ alert("Please Input Corrective EDC Plan Name!"); form.elements["stepForm.ecdPlanName"].focus(); return false; } } if (typeof form.elements["stepForm.area"]!= "undefined"){ var element = form.elements["stepForm.area"].value; if (element=="Please Select"){ alert("Please select area."); form.elements["stepForm.area"].focus(); return false; } } if (typeof form.elements["stepForm.waferId"]!= "undefined"){ var element = form.elements["stepForm.waferId"].value; if (element==""){ alert("Please select waferId."); form.elements["stepForm.waferId"].focus(); return false; } } if (typeof form.elements["stepForm.eqpModeName"]!= "undefined"){ var element = form.elements["stepForm.eqpModeName"].value; var elementFlag = form.elements["stepForm.contaminationFlag"].value; if (element=="" || element=="NA"){ alert("Equipment ID/Group can not be null or NA!"); form.elements["stepForm.eqpModeName"].focus(); return false; } if((element=="DUMMY" || element.indexOf("DMY02")!=-1)&& elementFlag!="NA"){ alert("EQPName is DUMMY.You must select the Contamination Flag 'NA'!"); return false; } } if (typeof form.elements["stepForm.recipe"]!= "undefined"){ var element = form.elements["stepForm.recipe"].value; if (element==""){ alert("Recipe can not be null"); form.elements["stepForm.recipe"].focus(); return false; } } if (typeof form.elements["stepForm.area"]!= "undefined"){ var element = form.elements["stepForm.area"].value; if (element==""){ alert("Area can not be empty"); form.elements["stepForm.area"].focus(); return false; } } if (typeof form.elements["stepForm.scannerRecipe"]!= "undefined"){ var element = form.elements["stepForm.scannerRecipe"].value; if (element==""){ alert("Scanner Recipe can not be null"); form.elements["stepForm.scannerRecipe"].focus(); return false; } } if (typeof form.elements["stepForm.trackOutRecipe"]!= "undefined"){ var element = form.elements["stepForm.trackOutRecipe"].value; if (element==""){ alert("Track Recipe can not be null"); form.elements["stepForm.trackOutRecipe"].focus(); return false; } } if (typeof form.elements["stepForm.waferSlotId"]!= "undefined"){ var element = form.elements["stepForm.waferSlotId"].value; if (element==""){ alert("Wafer/Slot Id can not be null"); form.elements["stepForm.waferSlotId"].focus(); return false; } } if (typeof form.elements["stepForm.contaminationFlag"]!= "undefined"){ var element = form.elements["stepForm.contaminationFlag"].value; var eqpName = form.elements["stepForm.eqpModeName"]; if (element=="Please Select"){ alert("Please Select Contamination Flag:"); form.elements["stepForm.contaminationFlag"].focus(); return false; } } if (typeof form.elements["stepForm.remark"]!= "undefined"){ var element = form.elements["stepForm.remark"].value; if(element.length>150) { alert("Remark 最多150个字符"); return false; } if(element.indexOf(">")!=-1 ||element.indexOf("<")!=-1){ alert("Remark can not have special character!"); form.elements["stepForm.remark"].focus(); return false; } if (element==""){ alert("Remark can not be null!"); form.elements["stepForm.remark"].focus(); return false; }else{ removeEnter(form.elements["stepForm.remark"]); } } if (typeof form.elements["stepForm.reticleId"]!= "undefined"){ var element = form.elements["stepForm.reticleId"].value; if (element==""){ alert("ReticleID can not be null!"); form.elements["stepForm.reticleId"].focus(); return false; } } if (typeof form.elements["stepForm.energy"]!= "undefined"){ var element = form.elements["stepForm.energy"].value; if (element==""){ alert("Energy can not be null!"); form.elements["stepForm.energy"].focus(); return false; } } if (typeof form.elements["stepForm.focus"]!= "undefined"){ var element = form.elements["stepForm.focus"].value; if (element==""){ alert("Focus can not be null!"); form.elements["stepForm.focus"].focus(); return false; } } if (typeof form.elements["stepForm.ovlData"]!= "undefined"){ var element = form.elements["stepForm.ovlData"].value; if (element==""){ alert("OVL Data can not be null!"); form.elements["stepForm.ovlData"].focus(); return false; } } if (typeof form.elements["stepForm.fabName"]!= "undefined"){ var element = form.elements["stepForm.fabName"].value; if (element==""){ alert("Please Select the Fab Area!"); form.elements["stepForm.fabName"].focus(); return false; } } if( typeof form.elements["stepForm.energyStep"]!= "undefined") { if(""==$F("stepForm.energyStep")) { alert("Please input the energyStep"); $("stepForm.energyStep").focus(); return false; } } if( typeof form.elements["stepForm.focusStep"]!= "undefined") { if(""==$F("stepForm.focusStep")) { alert("Please input the energyStep"); $("stepForm.focusStep").focus(); return false; } } form.action="addStepForm.action?ercParams=true"; checkboxSync(); disableButton(); form.submit(); } function checkWaferIdIsEqualSlotId(object){ //第二个参数中的 g 表示全部匹配,i表示忽略大小写 var regS = new RegExp("S","gi"); var regS1=new RegExp("#","gi"); var slotIds; var waferIds; var slotId=object.elements["stepForm.slotId"].value; var waferId=object.elements["stepForm.waferId"].value; if(slotId.indexOf("S")!=-1){ slotIds=slotId.replace(regS,""); }else{ slotIds=slotId.replace(regS1,""); } if(waferId.indexOf("S")!=-1){ waferIds=waferId.replace(regS,""); }else{ waferIds=waferId.replace(regS1,""); } var array=slotIds.split(","); for(var i=0;i<array.length;i++){ if(waferIds.indexOf(array[i])==-1) return false; } return true; } function removeEnter(object) { var regS = new RegExp(/\s*(.*?)\s*(\r\n)\s*/mg); var s = object.value; object.value = s.replace(regS, "$1"); //回车前后的空格都替换掉 } function showWaferId(){ var windowOptions = "directories=no,location=no,width=700,height=500,alwaysRaised=yes,resizable=yes,scrollbars=yes"; var win= window.open('showWaferId.action?w&requestFormId=113203','stepFormWaferid','left=500,top=20,width=150,height=450'); win.focus(); } function showSlotId(){ var win=window.open('showSlotId.action?s&requestFormId=113203','stepFormSlotid','left=500,top=20,width=150,height=450'); win.focus(); } function showWaferIdStr(){ var windowOptions = "directories=no,location=no,width=700,height=500,alwaysRaised=yes,resizable=yes,scrollbars=yes"; var win= window.open('showWaferIdStr.action?w&requestFormId=113203','stepFormWaferid','left=500,top=20,width=150,height=450'); win.focus(); } function showSlotIdStr(){ var win=window.open('showSlotIdStr.action?s&requestFormId=113203','stepFormSlotid','left=500,top=20,width=150,height=450'); win.focus(); } function check(object){ var Number ="0123456789"; var holdStepNo="01600"; var repositStepNo="01600"; var stepNo=object.value; for (i = 0; i < stepNo.length;i++){ var c = stepNo.charAt(i); if(Number.indexOf(c)==-1){ alert("StepNo must be number!"); object.value=""; object.focus(); return false; } } /*if(eval(stepNo)>eval(repositStepNo)||eval(stepNo)<eval(holdStepNo) ) { alert("StepNo: "+stepNo+" must be between "+holdStepNo+" and "+repositStepNo); object.value=""; object.focus(); return false; }*/ } function checkRemarkLength(object){ var value=object.value; if(value.length>150){ alert("Remark 最多150个字符"); return false; } var pattern = /[^\x00-\xff]/; if('Normal'=="Scan Defect" && pattern.test(object.value)){ alert("只能输入英文!"); object.focus(); return false; } } function checkEqpID(eqpID){ var form = document.forms['stepForm']; var areaValue=form.elements["stepForm.area"].value; form.elements["stepForm.eqpModeName"].value=""; if(typeof form.elements["stepForm.recipe"]!= "undefined") form.elements["stepForm.recipe"].value=""; if(typeof form.elements["stepForm.trackOutRecipe"]!= "undefined") form.elements["stepForm.trackOutRecipe"].value=""; var eqpId=eqpID.value; var eqpValue=form.elements["stepForm.eqpModeName"].value; var reg=/\s/g; var stringLength=eqpValue.replace(reg,""); if(eqpId=="Eqp ID"){ if(stringLength.length>7) {alert("最多7个字符!请重新输入Eqp ID"); form.elements["stepForm.eqpModeName"].value=""; form.elements["stepForm.eqpModeName"].focus(); return false; } if(eqpValue=="dummy" ||eqpValue=="DUMMY" || eqpValue.indexOf("DMY02")!=-1){ //DMY02 for cension if(areaValue=="PHOTO" || areaValue=="S1A-PHOTO" || areaValue=="S1B-PHOTO" ||areaValue=="S1C-PHOTO" || areaValue=="M1A-PHOTO" || areaValue=="M1B-PHOTO" || areaValue=="M1C-PHOTO" || areaValue=="SXA-PHOTO" || areaValue=="SXC-PHOTO") { alert("Please do not set area as PHOTO for DUMMY Eqp ID!"); form.elements["stepForm.area"].focus(); return false; } if(typeof form.elements["stepForm.recipe"]!= "undefined"){ form.elements["stepForm.recipe"].value="DUMMY"; form.elements["stepForm.recipe"].className="TextBoxReadOnly"; } } }else if(typeof form.elements["stepForm.recipe"]!= "undefined") form.elements["stepForm.recipe"].className="TextBoxReadWrite"; } </script> <div class="app"> <h3 class="center">Add Runcard Step</h3> <form name="stepForm" action="/erc/stepForm/addStepForm.action" method="post" onsubmit="return(stepForm_validate())" > <table class="wwFormTable"> <input type="hidden" name="requestFormId" value="113203" /><input type="hidden" name="stepFormId" /><input type="hidden" name="command" value="normal" /><input type="hidden" name="stepForm.RCP" value="on" /><input type="hidden" name="stepForm.noStepNo" value="uncheck" /><input type="hidden" name="stepForm.stepNoMes" value="01700" /> <input type="hidden" name="stepForm.measurementSpecNo" id="measurementSpecNo" value=""/> <TABLE STYLE="display:none" BORDER=0 CELLSPACING=0 CELLPADDING=0> <select name="strCondition" > </select> </TABLE> <table border="0" cellspacing="1" cellpadding="8" width="100%"> <tr class="b"> <td>*&nbspFab Area:</td> <td> <select name="stepForm.fabName" onchange="changeShow(this)" > <option value=""></option> <option value="A" >A</option> <option value="B" >B</option> <option value="C" >C</option> <option value="FAB7" >FAB7</option> <option value="FAB11" >FAB11</option> <option value="FAB15" >FAB15</option> <option value="FABJ1A" >FABJ1A</option> </select></td> <td>StepNo:</td> <td> NA <input type="checkbox" name="noStepNoPar" value="true" /><input type="text" name="stepForm.stepNo" size="10" value="01700" id="stepNo" onblur="check(this)" /> <input type="button" value="Go" onclick="getStepLotInfo();" > <input type="button" name="getStepList" value="ViewFutureStep" class="btn" onclick="doViewFutureStep('stepNo','getStepLotInfo()');">  <font color="red">(RunCard Step与MES Step做Compare)</font></td> </tr> <tr class="b" id="area" > <td>*&nbspArea:</td> <td colspan="3"> <select name="stepForm.area" onchange="changeByArea(this)" > <option value=""></option> </select>                      Check With RCP<input type="checkbox" name="rcpCheck" value="true" checked="checked" onclick="defalutValue();" /> </td> </tr> <tr id="showRemark" style="display:none;background: #efefef"> <td colspan="4"> <pre><font color="red" face="Arial">Is it Batch run at chamber: ADASM01_N&ADASM01_O or ADASM02_P&ADASM02_G or BDASM91_H&BDASM91_P If it is auto run, please fill in the special Eqp Group : ADVF_RCN_1&ADVF_RCO_1 or ADVF_RCP_1&ADVF_RCG_1 or ADVF_RCH_1&ADVF_RCP_2</font></pre> </td> </tr> <tr class="b"> <td>*&nbspEquipment:</td> <td colspan="3"><select name="stepForm.eqpMode" onchange="checkEqpID(this)" > <option value="Eqp ID" >Eqp ID</option> <option value="Eqp Group" selected="selected">Eqp Group</option> </select>:<input type="text" name="stepForm.eqpModeName" size="25" value="JMD_SRD_C" onblur="eqpToUpper(this)" /><font color="red">   (Eqp Group区分大小写.输入的Eqp ID 的最大长度为7位!)</font></td> </tr> <tr class="b" > <td>*&nbspRecipe:</td> <td colspan="3"><input type="input" name="stepForm.recipe" size="40" value="DI clean"/>   <font color="red">(区分大小写)</font></td> </tr> <tr class="b"> <td>*&nbspWafer ID:</td> <td colspan="3"> <input type="text" readonly="true" name="stepForm.waferId" value="#02,#03,#04,#05,#06,#07,#08,#09,#10,#11,#12,#13,#14,#15,#16,#17,#18,#19,#20,#21,#22,#23,#24,#25" id="wId" size="75" onclick="showWaferId()"/> Qty.:<input type="text" name="stepForm.waferIdQty" value="24" size="10" id="wQty" Style="background: #efefef;border:none"/> </td> </tr> <tr class="b"> <td>MeasSlotId:</td> <td colspan="3"><input type="text" readonly="true" name="stepForm.slotId" value="" id="sId" size="75" onclick="showSlotId();"/> Qty.:<input type="text" name="stepForm.slotIdQty" value="" size="10" id="sQty" Style="background: #efefef;border:none"/></td> </tr> <tr class="b"> <td>*&nbspContamination Flag: </td> <td colspan="3"> <select name="stepForm.contaminationFlag" onchange="checkNA(this)" > <option value="Please Select">Please Select</option> <option value="1--Front end w/o PR" >1--Front end w/o PR</option> <option value="2--Front end w/i PR (photo-resist)" >2--Front end w/i PR (photo-resist)</option> <option value="3--TiSix (eDRAM process)" >3--TiSix (eDRAM process)</option> <option value="4--Metal (W/Ti/TiN/AI-Cu) w/o PR" >4--Metal (W/Ti/TiN/AI-Cu) w/o PR</option> <option value="5--Metal (W/Ti/TiN/AI-Cu) w/i PR (photo-resist)" >5--Metal (W/Ti/TiN/AI-Cu) w/i PR (photo-resist)</option> <option value="6--Cobalt salicide" >6--Cobalt salicide</option> <option value="6.5--Cosix process b/f glue layer dep" >6.5--Cosix process b/f glue layer dep</option> <option value="7--Metal CAP dielectric" >7--Metal CAP dielectric</option> <option value="NA" >NA</option> </select> <b> current lot's contamination level: Please refer to Queen. </b> </td> </tr> <tr class="b"> <td colspan="4"><strong>实际下货Tools:</strong></td> </tr> <tr class="b"> <td>*&nbspRemark:</td> <td colspan="3"><textarea name="stepForm.remark" cols="35" rows="3" value="" onblur="checkRemarkLength(this)" ></textarea><font color="red">(如果输入中文,Runcard只能Manual Run!!)</font></td> </tr> <tr class="b"> <td>EDC Plan Name:</td> <!--onchange="showSpec();" --> <td colspan="3"><input type="text" name="stepForm.ecdPlanName" onchange="clearSpec();" value="" size="20" /><input type="button" onclick="showSpec();" value="Go"></td> </tr> <!-- Modity--> <tr class="b"> <td>量测规格SPEC</td> <td colspan="3"> <textarea name="stepForm.spec" cols="65" rows="2" value="" readonly="readonly" id="spec" style="background: #efefef;border:none" ></textarea> </td> </tr> </table> <h3>Runcard Qtime Inforamtion</h3> <table width="100%"> <tr> <td bgcolor="#87CEFA" colspan=9> <b> Qtime Configuration <font color="#0000FF">End </font> at this Step in Mainflow,pls select the 'Action'. </b> </td> </tr> <tr style="display:none"> <td> <input type="text" name="allEndQtimeHandle" /> </TD> </tr> <tr> <td bgcolor="#E6E6FA" width=15% colspan=2><b>End Qtime info:</b></td> <td bgcolor="#E6E6FA" colspan=7> <TABLE border=0 cellSpacing=1 cellSpacing=1 width="100%"> <TR> <TD >Plan ID </TD> <TD >Plan Ver </TD> <TD >StrStepSeq</TD> <TD ><font color="#0000FF"><B>EndStepSeq</font></TD> <TD >IntervalTime</TD> <TD >ControlType</TD> <TD >ExpireAction</TD> <TD >Action</TD> </TR> <TR> <TD >JLF100UPI0L01</TD> <TD >15</TD> <TD >01600</TD> <TD ><font color="#0000FF"><B>01700</font></TD> <TD >60</TD> <TD >Max Time</TD> <TD >Hold Lot</TD> <TD > <select name="endQtimeHanle113228" onchange="EndQtimeHanle(113228)" > <option value="Mapping" >Mapping</option> <option value="NULL" >NULL</option> </select> </TD> </TR> </Table> </td> </tr> </table> <table width="100%"> <tr class="a"> <tr class="b"><td colspan="4" class="center"><input type="button" onclick="checkPageToSubmit()" value="Submit" class="btn1" />      <input type="Button" class="btn1" value="Close" onclick="window.close();"></td> </tr> </table> </table> <script> function stepForm_validate() { var form = document.forms['stepForm']; var focus = stepForm_validate_actual(); if (focus != null) { element = form.elements[focus]; if(element.length > 0){ element = element[0]; } element.focus(); if (element.type == 'text' || element.type == 'textarea') { element.select(); } return false; } else { disableButton(); return true; } } function stepForm_validate_actual() { var form = document.forms['stepForm']; // cannot find any applicable validators return null; } </script> </form> <h3>Runcard Step Inforamtion</h3> <script> function updateWaferGroupResult(){ var form = document.forms['updateRequestForm']; form.action="updateWaferGroupResult.action"; form.submit(); } </script> <table border="0" cellspacing="1" cellpadding="8" width="100%"> <tr class="a"> <td><strong>Step List:</strong>     <a href="#1"><strong>1</strong></a> </td> </tr> </table> <table border="0" cellspacing="1" cellpadding="8" width="100%"> <tr class="a"> <td>Fab Area:</td> <td> FABJ1A </td> <td>NA<input type="checkbox" disabled="true"> Step No:                    01600</td> <td></td> </tr> <tr class="b"> <a name="1"> <td>Area:</td> <td >YE&FQC</td> <td>Check With RCP<input type="checkbox" disabled="true"></td> <td>Step Serial No:  <strong>1</strong></td> </tr> <tr class="b"> <td>Equipment:</td> <td colspan="3">Eqp Group: JME_MET_ET1</td> </tr> <tr class="b"> <td>Recipe:</td> <td colspan="3">CPBET3KA</td> </tr> <tr class="b"> <td>Wafer ID:</td> <td colspan="2">#02,#03,#04,#05,#06,#07,#08,#09,#10,#11,#12,#13,#14,#15,#16,#17,#18,#19,#20,#21,#22,#23,#24,#25</td><td>Qty.: 24</td> </tr> <tr class="b"> <td>Contamination Flag: </td> <td colspan="3">NA</td> </tr> <tr class="b"> <td colspan="4">实际下货Tools:</td> </tr> <tr class="b"> <td>Remark:</td> <td colspan="3">1</td> </tr> <tr> <td bgcolor="#87CEFF" colspan=9> <b> Qtime Configuration <font color="#0000FF">Start </font> at this Step in Mainflow,need setting after 'add the step': </b> </td> </tr> <tr > <td bgcolor="#DCDCDC" width=15% colspan=2><b>Qtime info:</b></td> <td bgcolor="#DCDCDC" colspan=7> <TABLE border=0 cellSpacing=1 cellSpacing=1 width="100%"> <TR> <TD >Plan ID </TD> <TD >Plan Ver </TD> <TD ><font color="#0000FF"><B><Red>StrStepSeq</font></TD> <TD >EndStepSeq</TD> <TD >IntervalTime</TD> <TD >ControlType</TD> <TD >ExpireAction</TD> <TD >mpsStepSeq</TD> </TR> <TR> <TD >JLF100UPI0L01</TD> <TD >15</TD> <TD ><font color="#0000FF"><B>01600</font></TD> <TD >01700</TD> <TD >60</TD> <TD >Max Time</TD> <TD >Hold Lot</TD> <TD ></TD> </TR> </Table> </td> </tr> </script> <tr class="a"> <td colspan="4" class="center"> <input type="button" value="Update" class="btn1" onclick="window.location.href='viewStepForm.action?requestFormId=113203&stepFormId=113212&command=YE&FQC'" />      <input type="button" class="btn1" value="Delete" onclick="window.location.href='deleteStepForm.action?requestFormId=113203&stepFormId=113212'"/>     <input type="Button" class="btn1" value="Close" onclick="window.close();"> </td> </tr> <tr bgcolor="#FFFFFF"> <td colspan="4"> </td></tr> <tr bgcolor="#FFFFFF"> <td colspan="4"> </td></tr> </table> <table border="0" cellspacing="1" cellpadding="8" width="100%"> <script> function doQTime(groupResult){ var form = document.forms['updateRequestForm']; form.action="comeinQTime.action?method=fromMainPage&groupResultId="+groupResult; form.submit(); } function doMainFlowQTime(groupResult){ var form = document.forms['updateRequestForm']; form.action="comeinMainFlowQTime.action?method=fromMainPage&groupResultId="+groupResult; form.submit(); } </script> <tr class="b"> <th colspan="4">Group Result</th> </tr> <tr class="b"> <td colspan="4"> <table border="0" cellspacing="1" cellpadding="8" width="100%"> <input type="hidden" name="groupResults[0].id" value="113213" /> <tr class=odder> <td><b>Wafer List</b></td> <td colspan=2 align=left><b>Step List</b></td> <td colspan=2><b>QTime(m)</b></td> <td></td> </tr> <tr class=odder> <td>#02,#03,#04,#05,#06,#07,#08,#09,#10,#11,#12,#13,#14,#15,#16,#17,#18,#19,#20,#21,#22,#23,#24,#25</td> <td width=15% colspan=2 align=left>01</td> <td colspan=2> <table border="0" cellspacing="1" cellpadding="8" width="100%"> <tr><TD><B>Type:</B>Max Time <B>Period:</B>60 <B>From:</B>1 <B>To:</B>01700 <B>mpsStepSeq:</B> <B>Action:</B>Hold Lot</TD></tr> </table> </td> <td> </td> </tr> </table> </td> </tr> </table> </div> <script> function doViewFutureStep(callField,functionCall) { var employeeSearchPopup; var windowOptions = "directories=no,location=no,width=700,height=500,alwaysRaised=yes,resizable=yes,scrollbars=yes"; employeeSearchPopup = window.open('../user/popUpFetchStepInfo.action?method=peFetchStepInfo&catalogue=StepSeq&fetchDirection=0&requestFormId=113203', 'employeeSearchPopup', windowOptions); employeeSearchPopup.focus(); callback = function (employeeNo){ document.getElementById(callField).value = employeeNo; employeeSearchPopup.close(); if (functionCall!=null) eval(functionCall); }; } </script>
09-19
undefined var savedScanIdType = $("#savedScanIdType").val(); <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <%@ page import="com.sjsemi.prms.constants.*" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="zh-CN"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title><%=Global.WEB_TITLE %> </title> <% request.setCharacterEncoding("UTF-8"); %> <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <link rel="stylesheet" type="text/css" href="lib/bootstrap/css/bootstrap.css"> <link rel="stylesheet" type="text/css" href="custom/global.css"> <link rel="stylesheet" type="text/css" href="stylesheets/theme.css"> <link rel="stylesheet" href="lib/font-awesome/css/font-awesome.css"> <link rel="stylesheet" type="text/css" href="stylesheets/jquery-ui.css"> <script src="lib/jquery-1.7.2.min.js" type="text/javascript"></script> <script src="lib/jquery-ui-1.10.4.js" type="text/javascript"></script> <style type="text/css"> .brand { font-family: georgia, serif; } .brand .first { color: #FF5C0D; font-style: italic; } .brand .second { color: #fff; font-weight: bold; } .table td { padding: 5px; line-height: 20px; border-top: 1px solid #dddddd; } </style> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="lib/html5.js"></script> <![endif]--> <!-- Le fav and touch icons --> <link rel="shortcut icon" href="../assets/ico/favicon.ico"> </head> <% String scanIdType = FormatUtils.parseString(request.getParameter("scanIdType")); %> <body> <%@ include file="navBar.jsp" %> <%@ include file="sideBar.jsp" %> <div class="content"> <div class="header"> <h1 class="page-title">Tally</h1> </div> <div class="container-fluid"> <div class="raw-fluid"> <div class="block span6" style="width: 100%;"> <a href="#tablewidget" class="block-heading" data-toggle="collapse">Search</a> <div id="tablewidget" class="block-body collapse in"> <form id="frmQuery"> <input type="hidden" name="pageIndex"/> <table class="table"> <thead> <tr> <td style="width: 10%">Scan ID:</td> <td><input type="text" style="width: 130px;" id="scanId" name="scanId" autocomplete="off"></td> <td style="width: 10%">Scan Id 类型:</td> <td colspan="3" style="text-align: left;"><select name="scanIdType" value="<%=scanIdType%>"> </select></td> <td style="width: 10%">Rack ID:</td> <td><input type="text" style="width: 130px;" id="rackId" name="rackId" readonly/></td> <td><input type="text" id="countId" name="countId" style="color: red; font-size: 14px; width: 50px;" value="0" readonly/></td> <td style="width: 30%"></td> </thead> </table> </form> </div> </div> </div> </div> <div class="container-fluid"> <form id="frmResult" action="<%=Page.TD_MATERIAL_INFO%>"> <div class="raw-fluid"> <div class="block span6" style="width: 100%;"> <div> <a href="#tablewidget1" class="block-heading" data-toggle="collapse">Search Result List</a> </div> <div id="tablewidget1" class="block-body collapse in" style="width: 100%;"> <table border="1" cellpadding="10" style="width: 99%;" id="searchResult"> <thead> <tr> <th rowspan="2"></th> <th rowspan="2">Cabinet ID</th> <th rowspan="2">Scan ID</th> </tr> </thead> <tbody id="q"></tbody> </tbody> </table> <div style="text-align: center;"> <button id="btn_submit" style="display:none;" type="button" class="btn btn-primary" onclick="saveRackLot();">Submit </button> </div> </div> </div> </div> </form> </div> </div> <script src="lib/bootstrap/js/bootstrap.js"></script> <script language="Javascript"> $(document).ready(function () { setScanIdType(); }); var sequence = 1; window.onload = function () { document.getElementById("scanId").focus(); } document.onkeydown = function enterserach() { if (isEnter(event)) { checkLotInfo(); } } function isEnter(e) { var keynum = 0; if (window.event) // IE { keynum = e.keyCode } else if (e.which) // Netscape/Firefox/Opera { keynum = e.which } if (keynum == 13) { return true; } else { return false; } } function trim(str) { return str.replace(/\s+/g, ""); } function getScanIdTypeDisplayName(value) { var map = { "LOTID": "Lot ID", "WAFERID": "Wafer ID", "REELID": "Reel ID", "CARRIERID": "Carrier ID", "SCANID": "Scan ID" }; return map[value] || value; } function setScanIdType() { $.ajax({ type: "POST", url: "RmsAction?accessMethod=<%=AccessMethod.AJAX %>", data: { 'actionCode': '<%=ActionCode.GET_RMS_SCAN_ID_TYPE %>', }, dataType: "json", success: function (data) { if (data.return_code == "0") { var values = data.return_value.split(','); var selectBox = $("select[name='scanIdType']"); selectBox.empty(); // 清空原有选项 // 遍历数组,生成下拉选项 $.each(values, function (index, value) { var displayName = getScanIdTypeDisplayName(value); selectBox.append( $("<option></option>") .attr("value", value) .text(displayName || value) ); }); // 从隐藏字段获取之前保存的值并设置回去 var savedScanIdType = $("#savedScanIdType").val(); if (savedScanIdType) { selectBox.val(savedScanIdType); // 设置回用户之前的选择 getRmsConfig(savedScanIdType); // 加载对应的配置 } else { // 默认加载第一个选项的配置 getRmsConfig(values[0]); } // 绑定 change 事件,动态加载配置 selectBox.on('change', function () { var selectedType = $(this).val(); $("#savedScanIdType").val(selectedType); // 保存当前选择 getRmsConfig(selectedType); }); } }, error: function () { alert("Ajax HTTP访问失败, 请联系IT处理!"); } }); } // 全局变量,用于存储从后台获取的配置 var lotIdConfig = { rackIdKeyword: null, lengthRequirement: 16 }; // 获取 RMS 配置 function getRmsConfig(rmsType) { let hasRackIdConfig = false; var scanIdInput = document.getElementById("scanId"); // 清除旧的配置 lotIdConfig.rackIdKeyword = null; lotIdConfig.lengthRequirement = 16; $.ajax({ type: "POST", url: "RmsAction?accessMethod=<%=AccessMethod.AJAX %>", data: { 'actionCode': '<%=ActionCode.GET_RMS_CONFIG_LIST %>', 'rmsType': rmsType }, dataType: "json", success: function (data) { if (data.return_code == "0") { if (data.return_value.length == 0) { alert("请在RMS配置维护中维护RMS配置名称:RACKID的条件!"); if (scanIdInput) scanIdInput.disabled = true; return; } // 更新全局配置 for (var i = 0; i < data.return_value.length; i++) { var item = data.return_value[i]; if (item.key === "LENGTH") { if (item.value === undefined || item.value === null || item.value === "NA") { lotIdConfig.lengthRequirement = 16; } else { var parsedValue = parseInt(item.value, 10); lotIdConfig.lengthRequirement = isNaN(parsedValue) ? 16 : parsedValue; } } else if (item.key === "CONTAIN") { hasRackIdConfig = true; lotIdConfig.rackIdKeyword = item.value; if (scanIdInput) scanIdInput.disabled = false; } } if (!hasRackIdConfig) { alert("请在RMS配置维护中维护RACKID的包含条件!"); if (scanIdInput) scanIdInput.disabled = true; } } else { alert(data.return_value); } }, error: function () { alert("Ajax HTTP访问失败, 请联系IT处理!"); } }); } var j = 1; function checkLotInfo() { var lotIdObj = document.getElementById("scanId"); lotId = trim(lotIdObj.value.toUpperCase()); if (lotId.length == 0) return; var rackIdObj = document.getElementById("rackId"); rackId = trim(rackIdObj.value.toUpperCase()); var objTable = document.getElementById("searchResult"); var rackIdKeyword = lotIdConfig.rackIdKeyword; var lengthRequirement = lotIdConfig.lengthRequirement; if (lotId.indexOf(rackIdKeyword) >= 0) { if (lotId.length === lengthRequirement) { rackIdObj.value = lotId; lotIdObj.value = ''; lotIdObj.focus(); } else { alert("库位当前不满足" + lengthRequirement + "码!"); lotIdObj.value = ''; lotIdObj.focus(); return; } } else { document.getElementById("btn_submit").style.display = ""; lotIdObj.value = ''; lotIdObj.focus(); var countIdObj = document.getElementById("countId"); countIdObj.value = objTable.rows.length; q.innerHTML = q.innerHTML + '<tr id="button' + j + '"><td style="width: 60px;text-align: center;">' + '<button type="button" class="btn btn-primary" id=' + j + ' onclick="removeLot(this);" >Remove</button></td>' + '<td style="width: 60px;text-align: center;" id="rackId' + j + '" Name="rackId" >' + rackId + '</td>' + '<td style="width: 60px;text-align: center;" id="scanId' + j + '" Name="scanId" >' + lotId + '</td></tr>'; j++; } } function removeLot(obj) { var tb = document.getElementById("searchResult"); var id = obj.id; var row = document.getElementById("button" + id); var index = row.rowIndex; tb.deleteRow(index); var countIdObj = document.getElementById("countId"); countIdObj.value = tb.rows.length - 1; } function saveRackLot() { //获取循环次数 var countId = document.getElementById("countId").value; var count = parseInt(countId); //判断次数 var isCount = parseInt(0); var strs1 = []; var strs2 = []; for (i = 1; i <= count; i++) { var scanId = ""; var rackId = ""; var searchResult = document.getElementById("searchResult"); var rows = searchResult.rows;//获取所有行 for (var i = 1; i < rows.length; i++) { var row = rows[i];//获取每一行 scanId = row.cells[1].id; rackId = row.cells[2].id; var scanIds = document.getElementById(rackId).innerHTML; var rackIds = document.getElementById(scanId).innerHTML; strs1 = strs1 + "," + scanIds; strs2 = strs2 + "," + rackIds; isCount++ } } if (count > 0) { if (isCount == count) { $.ajax({ type: "POST", url: "RmsAction?accessMethod=<%=AccessMethod.AJAX %>", data: { 'actionCode': '<%=ActionCode.CREATE_RMS_LOT %>', 'scanId': strs1, 'rackId': strs2, 'count': count }, dataType: "json", success: function (data) { if (data.return_code == "0") { alert(data.return_value); // 不要刷新页面,清空表格即可 document.getElementById("searchResult").innerHTML = ""; j = 1; document.getElementById("countId").value = "0"; } else { alert(data.return_value); } }, error: function () { alert("Ajax HTTP访问失败, 请联系IT处理!"); $('#butSend').attr("disabled", false); } }); } } else { alert("请输入数据后再提交!") } } </script> </body> </html>
12-11
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值