使用命令清除控制台
Clear console with command
这是我的控制台,目前有很多行
有没有javascript或jquery命令可以清除控制台。
I don't want to hit clear button with mouse. Only a code command is required.
试试这个:
console.clear();
您可以在脚本中使用此代码。详细了解 console。
Note that in Google Chrome, console.clear() has no effect if the user
has selected "Preserve log upon navigation" in the settings.
更新:如@evolutionxbox 所述,您只需使用 clear()
即可。你会得到相同的结果。
您还可以使用键盘快捷键在网络浏览器中清除控制台:
CTRL + L
在 Firebug 中清除控制台:ALT + R
您可以使用 console.clear()
,至少在 Chrome。
所有浏览器的通用约定是
clear()
对于 chrome 和其他一些基于 webkit 的浏览器,您也可以使用
console.clear()
您可以使用以下任一命令
clear()
console.clear()
window.clear()
或
CTRL
+ L
作为清除开发者控制台的快捷方式。
这是我的控制台,目前有很多行
有没有javascript或jquery命令可以清除控制台。
I don't want to hit clear button with mouse. Only a code command is required.
试试这个:
console.clear();
您可以在脚本中使用此代码。详细了解 console。
Note that in Google Chrome, console.clear() has no effect if the user has selected "Preserve log upon navigation" in the settings.
更新:如@evolutionxbox 所述,您只需使用 clear()
即可。你会得到相同的结果。
您还可以使用键盘快捷键在网络浏览器中清除控制台: CTRL + L
在 Firebug 中清除控制台:ALT + R
您可以使用 console.clear()
,至少在 Chrome。
所有浏览器的通用约定是
clear()
对于 chrome 和其他一些基于 webkit 的浏览器,您也可以使用
console.clear()
您可以使用以下任一命令
clear()
console.clear()
window.clear()
或
CTRL
+ L
作为清除开发者控制台的快捷方式。