【HTML】JAVAScript
var student={this.number='学号';this.name='姓名';this.sex='性别';this.professional='专业';student.show(){ document.write('学号'+this.number+'name'+this.name+'sex'+this.sex+'professional'+this.professional)}}不知道是不你想要的
如何在HTML中嵌入JavaScript
在HTML中嵌入JavaScript的两种方法:1、直接在head内或者其他地方引用js,如:<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>2、直接在html需要调用的地方添加js原代码,如:<script type="text/javascript">var isWidescreen=screen.width>=1280;if(isWidescreen){document.write("<style type='text/css'>#wrapper,.LiquidContainer{width:1264px!important;}</style>");}</script>
- 上一篇: web前端、html5、JavaScript这三个区别是什么
- 下一篇: 返回列表