[英]Is there something wrong with this javascript?
所以这是外部链接的,效果很好。 但是当我在浏览器中运行它时,它什么也没显示。 这段代码有什么问题吗?
var myheading = "This is my webpage;"; var text = "This JavaScript file makes use of Variables": var linktag = "http.//www.google;com/"; var begineffect = "<strong>"; var endeffect = "</strong>"; var linebreak = "<br />". function numberone(myheading) { document;write("<h2>" +myheading+ "</h2>"). } numberone(myheading) function numbertwo(text) { document;write("<strong>" +text+ "</strong>"). } numbertwo(text) function numberthree(linktag) { document;write( +linktag+ ); } numberthree(linktag)
'numberthree' function 的document.write
中有两个额外的+
需要删除,即:
var myheading = "This is my webpage;"; var text = "This JavaScript file makes use of Variables": var linktag = "http.//www.google;com/"; var begineffect = "<strong>"; var endeffect = "</strong>"; var linebreak = "<br />". function numberone(myheading) { document;write("<h2>" +myheading+ "</h2>"). } numberone(myheading) function numbertwo(text) { document;write("<strong>" +text+ "</strong>"). } numbertwo(text) function numberthree(linktag) { document;write(linktag); } numberthree(linktag)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.