| | |
| | | |
| | | <div id="btn-con"> |
| | | <button style="margin-right: 20px" onclick="reset()">重置</button> |
| | | <button onclick="comb()">组托</button> |
| | | <button id="comb" onclick="comb()">组托</button> |
| | | <span id="tips"></span> |
| | | </div> |
| | | |
| | |
| | | var ttbody = document.getElementById("ttbody"); |
| | | var btnCon = document.getElementById("btn-con"); |
| | | var tipDom = document.getElementById("tips"); |
| | | var combBtn = document.getElementById("comb"); |
| | | |
| | | var matDetail = document.getElementById("mat-detail"); |
| | | var matName = document.getElementById("matName"); |
| | | var str1 = document.getElementById("str1"); |
| | | var count = document.getElementById("count"); |
| | | var confirmBtn = document.getElementById("confirm"); |
| | | |
| | | matDetail.style.display = 'none'; |
| | | var initMatCount = 1; |
| | |
| | | matName.value = res.data.matName; |
| | | str1.value = res.data.str1; |
| | | count.value = initMatCount; |
| | | document.getElementById("confirm").focus(); |
| | | } else { |
| | | matMsg.style.display = 'block'; |
| | | btnCon.style.display = 'block'; |
| | |
| | | requestData += name + '='+ paramData[name] + '&'; |
| | | } |
| | | requestData = requestData === '' ? '' : requestData.substring(0,requestData.length - 1); |
| | | console.log(requestData) |
| | | /*请求接收*/ |
| | | xmlhttp.onreadystatechange = function() { |
| | | if(xmlhttp.readyState === 4 && xmlhttp.status === 200) { |
| | |
| | | } |
| | | } |
| | | |
| | | document.onkeyup = function (e) { |
| | | document.onkeydown = function (e) { |
| | | if (window.event)//如果window.event对象存在,就以此事件对象为准 |
| | | e = window.event; |
| | | var code = e.charCode || e.keyCode; |
| | | if (code === 13) { |
| | | comb() |
| | | var code1 = e.charCode || e.keyCode; |
| | | if (code1 === 13) { |
| | | if (window.getComputedStyle(matDetail).display === 'block') { |
| | | confirm() |
| | | } else if (window.getComputedStyle(btnCon).display === 'block') { |
| | | comb() |
| | | } |
| | | } |
| | | } |
| | | |