您的位置:首页 > Web前端 > JavaScript

JavaScript 的Console log 测试小例

2014-05-04 13:52 190 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Console log 测试</title>
</head>
<body>
	<h1>Console log 测试</h1>
	<input type="button" onclick="testConsole()" value="Console log 测试">
	<dl>
		<dd></dd>
	</dl>
	<script type="text/javascript">
		function testConsole(){
			var full_url="media://192.168.1.101/DoDo/DaoLang-PiZheYangPiDeLang.wma<刀螂-披着羊皮的狼&rt;lyric://192.168.1.101/DoDo/DaoLang-PiZheYangPiDeLang.lrc"
    		console.log(full_url)
		}
	</script>
</body>
</html>


Qt 客户端的测试方法

重载下面的函数:

void QWebPage::javaScriptConsoleMessage(const QString & message, int lineNumber, const QString & sourceID) [virtual protected]

This function is called whenever a JavaScript program tries to print a message to the web browser's console.

For example in case of evaluation errors the source URL may be provided in sourceID as well as the lineNumber.

The default implementation prints nothing.

即可接收.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: