By GokiSoft.com|
15:47 14/10/2020|
Học JS
[Share Code] Hướng dẫn tìm hiểu lập trình Javascript
<!DOCTYPE html>
<html>
<head>
<title>Javascript tutorial</title>
<meta charset="utf-8">
</head>
<body>
<h1>Welcome to learn Javascript</h1>
<script type="text/javascript">
var x = 1;//so nguyen
document.write(x + '<br/>')
x = 'TRAN VAN A' //chuoi => string
document.write(x + '<br/>')
y = 'Xin Chao'
document.write(y)
// alert('TEST')
// x = prompt('Nhap x')
document.write(x)
// option = confirm('Bạn có muốn format ổ cứng ko?')
// console.log(option)
document.write('Hello World!!!');
console.log('abc...xyz')
x = 5
y = "5.0"
if(y === x) {
console.log('true ===')
}
z = x * y;
console.log(z)
var result = ''
for (var i = 0; i<=15; i++) {
if(i % 2 == 0) {
result += i + '\n'
}
}
alert('Test: \n'+result)
</script>
</body>
</html>
Tags:
Phản hồi từ học viên
5
(Dựa trên đánh giá ngày hôm nay)