with
指定されたオブジェクトを省略して記述できるようにします。
構文
with (オブジェクト名) ...
例文
<html>
<head>
<title>with</title>
</head>
<body>
<script type="text/javascript"><!--
with(document) {
write("with sample");
}
// --></script>
</body>
</html>
関連記事
- while
- var
- try
- throw
- this
- switch
- return
- new
- if
- function
- finally
- else
- do
- delete
- default
- continue
- const
- catch
- case
- break
- Comment / コメント / 注釈
スポンサーリンク





