<html>
<head><title>Welcome Page</title>
</head>
<body>
<script language="javascript">
function $(obj) {
if ( document.getElementById && document.getElementById(obj) ) {
return document.getElementById(obj);
}
if ( document.all)
return document.getElementById(obj);
if ( document.layer && document.layer[obj] )
return document.layer[obj];
}
document.onload = alert('Hello world!');
document.write('<div class="main"><b>Main Div</b></div>');
document.write('<button id="btn" onClick="javascript:alert(/'Click/')">getContents</button>');
var oMain = document.getElementById('main');
$('btn').onClick = alert('$');
</script>
</body>
</html>
vim 练习
最新推荐文章于 2024-11-04 19:10:51 发布