| | |
| | | $(this).parent().parent().find("input").val($(this).text()); |
| | | $(".xialapb").hide(); |
| | | }); |
| | | |
| | | |
| | | |
| | | var selmachine = document.getElementById('selPMS_Machine'); |
| | | |
| | | if (selmachine.value.indexOf('轮转') >= 0) { |
| | | //var select = document.getElementById("PSF_Typesetting"); |
| | | //var option = select.options[0]; // index是要修改的option的索引 |
| | | //option.text = "扣版"; |
| | | //option.value = "扣版"; |
| | | |
| | | //var option1 = select.options[1]; // index是要修改的option的索引 |
| | | //option1.text = "单面"; |
| | | //option1.value = "单面"; |
| | | // 获取select元素 |
| | | |
| | | var selectElement = document.getElementById('PSF_Typesetting'); |
| | | |
| | | var sssssss = selectElement.value; |
| | | |
| | | // 清空现有的option |
| | | selectElement.innerHTML = ''; |
| | | |
| | | const newOptions = [ |
| | | { value: '扣版', text: '扣版' }, |
| | | { value: '单面', text: '单面' } |
| | | |
| | | ]; |
| | | |
| | | // 4. 批量新增option到select中(2种方法,按需选择) |
| | | // 方法1:循环创建Option对象(标准DOM操作,推荐,兼容性最好) |
| | | newOptions.forEach(option => { |
| | | // 创建option元素:new Option(显示文本, 实际值) |
| | | const opt = new Option(option.text, option.value); |
| | | // 将option添加到select中 |
| | | selectElement.add(opt); |
| | | }); |
| | | |
| | | selectElement.value = sssssss; |
| | | } else { |
| | | //var select = document.getElementById("PSF_Typesetting"); |
| | | //var option = select.options[0]; // index是要修改的option的索引 |
| | | //option.text = "扣版"; |
| | | //option.value = "扣版"; |
| | | |
| | | //var option1 = select.options[1]; // index是要修改的option的索引 |
| | | //option1.text = "单面"; |
| | | //option1.value = "单面"; |
| | | // 获取select元素 |
| | | var selectElement = document.getElementById('PSF_Typesetting'); |
| | | var sssssss = selectElement.value; |
| | | // 清空现有的option |
| | | selectElement.innerHTML = ''; |
| | | |
| | | const newOptions = [ |
| | | { value: '自翻', text: '自翻' }, |
| | | { value: '滚翻', text: '滚翻' }, |
| | | { value: '扣版', text: '扣版' }, |
| | | { value: '单面', text: '单面' } |
| | | |
| | | ]; |
| | | |
| | | // 4. 批量新增option到select中(2种方法,按需选择) |
| | | // 方法1:循环创建Option对象(标准DOM操作,推荐,兼容性最好) |
| | | newOptions.forEach(option => { |
| | | // 创建option元素:new Option(显示文本, 实际值) |
| | | const opt = new Option(option.text, option.value); |
| | | // 将option添加到select中 |
| | | selectElement.add(opt); |
| | | }); |
| | | |
| | | selectElement.value = sssssss; |
| | | } |
| | | |
| | | |
| | | }); |
| | | </script> |
| | |
| | | document.getElementById('CTPCount').value = ''; |
| | | } |
| | | |
| | | |
| | | if (sel.value.indexOf('轮转') >= 0) { |
| | | //var select = document.getElementById("PSF_Typesetting"); |
| | | //var option = select.options[0]; // index是要修改的option的索引 |
| | | //option.text = "扣版"; |
| | | //option.value = "扣版"; |
| | | |
| | | //var option1 = select.options[1]; // index是要修改的option的索引 |
| | | //option1.text = "单面"; |
| | | //option1.value = "单面"; |
| | | // 获取select元素 |
| | | var selectElement = document.getElementById('PSF_Typesetting'); |
| | | |
| | | // 清空现有的option |
| | | selectElement.innerHTML = ''; |
| | | |
| | | const newOptions = [ |
| | | { value: '扣版', text: '扣版' }, |
| | | { value: '单面', text: '单面' } |
| | | |
| | | ]; |
| | | |
| | | // 4. 批量新增option到select中(2种方法,按需选择) |
| | | // 方法1:循环创建Option对象(标准DOM操作,推荐,兼容性最好) |
| | | newOptions.forEach(option => { |
| | | // 创建option元素:new Option(显示文本, 实际值) |
| | | const opt = new Option(option.text, option.value); |
| | | // 将option添加到select中 |
| | | selectElement.add(opt); |
| | | }); |
| | | } else { |
| | | //var select = document.getElementById("PSF_Typesetting"); |
| | | //var option = select.options[0]; // index是要修改的option的索引 |
| | | //option.text = "扣版"; |
| | | //option.value = "扣版"; |
| | | |
| | | //var option1 = select.options[1]; // index是要修改的option的索引 |
| | | //option1.text = "单面"; |
| | | //option1.value = "单面"; |
| | | // 获取select元素 |
| | | var selectElement = document.getElementById('PSF_Typesetting'); |
| | | |
| | | // 清空现有的option |
| | | selectElement.innerHTML = ''; |
| | | |
| | | const newOptions = [ |
| | | { value: '自翻', text: '自翻' }, |
| | | { value: '滚翻', text: '滚翻' }, |
| | | { value: '扣版', text: '扣版' }, |
| | | { value: '单面', text: '单面' } |
| | | |
| | | ]; |
| | | |
| | | // 4. 批量新增option到select中(2种方法,按需选择) |
| | | // 方法1:循环创建Option对象(标准DOM操作,推荐,兼容性最好) |
| | | newOptions.forEach(option => { |
| | | // 创建option元素:new Option(显示文本, 实际值) |
| | | const opt = new Option(option.text, option.value); |
| | | // 将option添加到select中 |
| | | selectElement.add(opt); |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |