怎样给变量赋值
<!
DOCTYPE html
>
<
html
lang
=
"en"
>
<
head
>
<
meta
charset
=
"UTF-8"
>
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1.0"
>
<
meta
http-equiv
=
"X-UA-Compatible"
content
=
"ie=edge"
>
<
title
>
Document
</
title
>
<
script
type
=
"text/javascript"
>
var
score
=
20
;
if
(
score
>
60
){
document
.
write
(
"及格"
);
}
else
{
document
.
write
(
"不及格"
);
}
<
/
script
>
</
head
>
<
body
>
</
body
>
</
html
>
怎样调用函数
<!
DOCTYPE html
>
<
html
lang
=
"en"
>
<
head
>
<
meta
charset
=
"UTF-8"
>
<
meta
name
=
"viewport"
content
=
"width=device-width, initial-scale=1.0"
>
<
meta
http-equiv
=
"X-UA-Compatible"
content
=
"ie=edge"
>
<
title
>
Document
</
title
>
<
script
type
=
"text/javascript"
>
function
contxt
()
{
alert
(
"函数调用"
);
}
<
/
script
>
</
head
>
<
body
>
<
form
>
<
input
type
=
"button"
value
=
"点我"
onclick
=
"contxt()"
/>
</
form
>
</
body
>
</
html
>