onUploadstarted:function(uploadInfo) {if(Uploadmethod1) {if(!uploadInfo.videoId)// No error occurred during file upload.{// Call the CreateUploadVideo operation in your environment.uploader.setUploadAuthAndAddress(uploadInfo, uploadAuth, uploadAddress,videoId); }else// If the videoId parameter...
function checkAge(data) { if (data === { age: 18 }) { console.log("You are an adult!"); } else if (data == { age: 18 }) { console.log("You are still an adult."); } else { console.log(`Hmm.. You don't have an age I guess`); } } checkAge...
sample.js functionchange(){constsubmitBtn=document.getElementById('button');constcheckboxes=document.querySelectorAll('input[name="sample"]:checked');if(checkboxes.length===0){submitBtn.disabled=true;}else{submitBtn.disabled=false;}} id属性から送信ボタンの要素を取得して変数に代入しています。
length; //チェックが入っているチェックボックスの取得 if( checkedsum > 0 ){ $('.q2').prop("required",false); //required属性の解除 }else{ $('.q2').prop("required",true); //required属性の付与 } }); こうすれば、チェックボックスでも、「最低一つ選択されているか確認す...
function FindProxyForURL(url, host) { if (isPlainhost name(host) || dnsDomainIs(host, ".mydomain.com")) return "DIRECT"; else if (shExpMatch(host, "*.com")) return "PROXY proxy1.mydomain.com:8080; " + "PROXY proxy4.mydomain.com:8080"; else if (shExpMatch(host, "*.edu")) ...
if (contentControls.items.length === 0) { console.log("There aren't any content controls in this document so can't register event handlers."); } else { for (let i = 0; i < contentControls.items.length; i++) { eventContexts[i] = contentControls.items[i].onDeleted.add(contentContr...
{ const eventUpdated = event.getLastUpdated(); if (eventUpdated > twoWeeksLater) { break; } else if (eventUpdated > lastUpdated) { twoWeeksMap.set(event.getId(), eventUpdated); // メール通知項目を生成 const eventDetails = { title: event.getTitle() || 'タイトル' + isNotExist, ...
{if(a.readyState===XMLHttpRequest.DONE)if(200===a.status)try{t(JSON.parse(a.responseText))}catch(e){r()}else r()},a.send())):o&&r();try{h.cookie=O.cookie}catch(k){}function e(e){for(;e.length;)!function(t){h[t]=function(){var e=arguments;f||h.queue.push(function...
("="); if ( tuple.length === 1 ) { tuple[1] = false; } else if ( tuple.length != 2 ) { throw "parse error: you need to use exactly one '=' between key and value and not use '=' in either key or value"; } myObject[tuple[0]] = tuple[1]; }); return myObject; ...
); var optionsString; if (options != null) { if (options.charAt(0) != "?") { optionsString = "?" + options; } else { optionsString = options; } } var req = new XMLHttpRequest(); req.open("GET", this._ODataPath() + type + "Set" + optionsString, true); req.se...