document.write()和document.writeln()的区别,实现换行

来源:互联网 发布:网络咨询师技巧 编辑:程序博客网 时间:2024/04/27 21:04
<html><head><title>document.write</title><script>document.write("hello");document.writeln("world");//document.writeln()不能换行,只是多了空格,相当于\r\ndocument.writeln("world");document.write("<br/>");document.write("hu");//输出一个按钮,注意多个引号的嵌套问题document.write("<input type='button' value='我是按钮'/>");</script></head><body></body></html>

0 0
原创粉丝点击