当脚本“语言”时,javascript函数无法正常工作属性更改为“类型” [英] javascript function not working when script "language" attribute is changed to "type"
本文介绍了当脚本“语言”时,javascript函数无法正常工作属性更改为“类型”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
更改< script language =" javascript">到< script type =" text / javascript">,javascript函数现在不再工作了。以前它工作。 Javascript函数如下 -
When change the <script language="javascript"> to <script type="text/javascript">, javascript function now works no more. Previously it was working. Javascript function is given below -
展开 | 选择 | Wrap | < span class =codeLinkonclick =LineNumbers(this);>行号
推荐答案
尝试使用window.location.href。
只需注意:没有必要使用字体标签。用div标签替换它们。
Try using window.location.href.
Just a note: there''s no need to use font tags. Replace them with div tags.
我更改了代码如下 -
I changed the code as follows -
展开 | 选择 | 换行 | 行号
显示你的其余代码。
Show the rest of your code.
我不应该使用< font>在浏览器中放置文本的标签? < font>之间有什么区别吗?和< div>用于放置文字?
Should I not use <font> tag for placing text in browser? Is there any difference between <font> and <div> for placing text?
不推荐使用字体标记。您应该使用CSS进行样式设置。在这里你没有在文本标签中放置文本,你只是显示按钮。
The font tag is deprecated. You should use CSS for styling. Here you''re not placing text within the font tags, you were just displaying buttons.
这篇关于当脚本“语言”时,javascript函数无法正常工作属性更改为“类型”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文