function onWindowLoad() {
chrome.tabs.query({'active': true, 'lastFocusedWindow': true}, function (tabs) {
tabUrl = tabs[0].url;
alert(tabUrl);//taburl is Successfully displayed in my browser
$("#txtUrl").val(tabUrl);//This line of code is not implemented
alert("hello");//cant't alert hello
});
window.onload = onWindowLoad;
请帮帮我:我想把网址拿到网页上,但是在运行代码后没有任何反应,如何处理?