MinsoftK

test how to convey parameter by self

......@@ -7,11 +7,11 @@
<script>
function nightDayHandler(self){
var target=document.querySelector('body');
if(this.value==='night')
if(self.value==='night')
{
target.style.backgroundColor= 'black';
target.style.color= 'white';
this.value= 'day';
self.value= 'day';
var alist=document.querySelectorAll('a');
var i =0;
......@@ -23,7 +23,7 @@ function nightDayHandler(self){
}else{
target.style.backgroundColor= 'white';
target.style.color= 'black';
this.value= 'night';
self.value= 'night';
var alist=document.querySelectorAll('a');
var i =0;
......