Javascript/jQuery 重要構文
問題文
(document.write(" ");)
document.write(" ");
(document.writeln(" ");)
document.writeln(" ");
(var a="<br>" document.write(a);)
var a="<br>" document.write(a);
(var today=new Date();)
var today=new Date();
(var hour=today.getHours();)
var hour=today.getHours();
(if(){}else{})
if(){}else{}
(a>b)
a>b
(a>=b)
a>=b
(a<b)
a<b
(a<=b)
a<=b
(a==b)
a==b
(a===b)
a===b
(a!=b)
a!=b
(a++;)
a++;
(++a;)
++a;
(function a(x){ x=x*(-1);})
function a(x){ x=x*(-1);}
(history.go(x);)
history.go(x);
(<onclick="a(x)">)
<onclick="a(x)">
(function a(tate,yoko){ var menseki=tate*yoko; document.write(menseki);})
function a(tate,yoko){ var menseki=tate*yoko; document.write(menseki);}
(var w=new Array; w[0]="Sun"; w[1]="Mon"; D=new Date(); no=D.getDay(); document.write(w[no]+"day");)
var w=new Array; w[0]="Sun"; w[1]="Mon"; D=new Date(); no=D.getDay(); document.write(w[no]+"day");
(today=new Date(); var year=today.getFullYear();)
today=new Date(); var year=today.getFullYear();
(var month=today.getMonth()+1;)
var month=today.getMonth()+1;
(var month=today.getDay();)
var month=today.getDay();
(var w=new Array("Sun","Mon","Tues","Wednes","Thirs","Fri","Satur"); document.write(w[no]+"day");)
var w=new Array("Sun","Mon","Tues","Wednes","Thirs","Fri","Satur"); document.write(w[no]+"day");
(var moji=$("#a").val();)
var moji=$("#a").val();
(alert("test");)
alert("test");
($("#a").attr("src");)
$("#a").attr("src");
($("#a").attr("src",f);)
$("#a").attr("src",f);
(x=Math.floor(Math.random()*6)+1;)
x=Math.floor(Math.random()*6)+1;
($("#a").addClass("takasa");)
$("#a").addClass("takasa");
($("#a").removeClass("takasa");)
$("#a").removeClass("takasa");
($("#a").toggleClass("takasa");)
$("#a").toggleClass("takasa");
(var c=$("#a").hasClass("takasa"); if(c){ alert("on");}else{ alert("off");})
var c=$("#a").hasClass("takasa"); if(c){ alert("on");}else{ alert("off");}
(<input type="email">)
<input type="email">
(<input type="password">)
<input type="password">
(<input type="text" id="name" required>)
<input type="text" id="name" required>
($("#a").css("background","#f99");)
$("#a").css("background","#f99");
(<form method="post" onsubmit="return false" action="">)
<form method="post" onsubmit="return false" action="">
($(function(){});)
$(function(){});
($("#a").click(function(){});)
$("#a").click(function(){});
(if(a==0){ alert("0"); return;} if(a!=0){ alert("not 0"); return;})
if(a==0){ alert("0"); return;} if(a!=0){ alert("not 0"); return;}
($("#a").focus(function(){});)
$("#a").focus(function(){});
($("#a").blur(function(){});)
$("#a").blur(function(){});
(a=new Array("10","20","30",);$.each(a,function(key,value){alert(key+value);});)
a=new Array("10","20","30",);$.each(a,function(key,value){alert(key+value);});
($.each(i,function(){});)
$.each(i,function(){});
($("#a").append("aiueo");)
$("#a").append("aiueo");
(<link rel="stylesheet" href="jQueryUI/jquery-ui.css">)
<link rel="stylesheet" href="jQueryUI/jquery-ui.css">
(<script src="jqueryUI/external/jquery/jquery.js"><script>)
<script src="jqueryUI/external/jquery/jquery.js"><script>
(<script src="jQueryUI/jquery-ui.js"></script>)
<script src="jQueryUI/jquery-ui.js"></script>
($("#a").tabs();)
$("#a").tabs();
(<a href="#" id="btn" class="ui-icon ui-icon-info"></a>)
<a href="#" id="btn" class="ui-icon ui-icon-info"></a>
($("#a").dialog("open");)
$("#a").dialog("open");
($("#a").dialog({autoOpen:false});)
$("#a").dialog({autoOpen:false});
($("#a").dialog({buttons:{"OK":function(){ alert("OK");}}});)
$("#a").dialog({buttons:{"OK":function(){ alert("OK");}}});
(b=$("#a").text();)
b=$("#a").text();
($("#a").text("Hello");)
$("#a").text("Hello");
($("button").bind("click",function(){});)
$("button").bind("click",function(){});
(¥)
¥
( )
 
($("#a").parent();)
$("#a").parent();
($("#a").children();)
$("#a").children();
($("#a").clone();)
$("#a").clone();
($("#a").effect("bounce","",300,function{}))
$("#a").effect("bounce","",300,function{})
($(document).keypress(function(e){ no=e.keyCode});)
$(document).keypress(function(e){ no=e.keyCode});
($("#a").animate({left:x});)
$("#a").animate({left:x});
($("button").eq(0).click(function(){});)
$("button").eq(0).click(function(){});
($.ajax({url:"itemlist.txt", success:function(data){ a=data.split(","); alert(a);}});)
$.ajax({url:"itemlist.txt", success:function(data){ a=data.split(","); alert(a);}});
($("#a").slideDown();)
$("#a").slideDown();
($("#a").slideUp();)
$("#a").slideUp();
($("#a").slideToggle();)
$("#a").slideToggle();
(setInterval("b()",1000);)
setInterval("b()",1000);
(clearInterval(s);)
clearInterval(s);
($("#a").mousemove(function(e){ mx=e.clientX; my=clientY;});)
$("#a").mousemove(function(e){ mx=e.clientX; my=clientY;});