我遇到了window.open()问题
I'm having window.open() problems?
好的,所以我有这个函数,它使用 window.open 为我创建一个帐户,但问题是它记录了"窗口打开">,但之后它不会记录任何内容,没有错误,也不会创建帐户。谁能想到它这样做的原因?
var accountPassword = "testPassword512"
function checkUsername(username, callback) {
$.get("http://www.roblox.com/UserCheck/DoesUsernameExist?username=" + username, function(data) {
callback(data.success); // true = taken , false = not taken
});
};
function makeNewAccount(accountName) {
checkUsername(accountName, function(response) {
if (response == false) {
console.log("Making account: " + accountName)
signupWindow = window.open("http://www.roblox.com/login/signup.aspx");
console.log("Window opened");
signupWindow.document.getElementById('SignupUsername').val(accountName);
signupWindow.document.getElementById('SignupPassword').val(accountPassword);
signupWindow.document.getElementById('SignupPasswordConfirm').val(accountPassword);
signupWindow.document.getElementById("birthdayMonthSelect").value = 0;
signupWindow.document.getElementById("birthdayDaySelect").value = 0;
signupWindow.document.getElementById("birthdayYearSelect").value = 25;
console.log("done with values");
signupWindow.document.getElementByClassName('.gender-circle').click();
console.log("done choosing gender");
signupWindow.document.getElementById('SignUpButton').submit();
console.log("account made");
} else {
return true; // true = account taken , false = not taken
}
});
}
makeNewAccount('240213mfasd')
你似乎将"jQuery"(.val()
(与"not jQuery"(.value =
( 混合在一起
别这样。
相关文章:
- 在指令控制器中使用$attrs时出现问题
- 将PHP变量传递给jQuery时遇到问题
- Canvas Html5绘图应用程序,移动画布会导致重大问题
- 参数变量出现ngTable指令问题
- 剑道网格jQuery动画()问题
- 直接下载文件,而不是从window.open(url)
- 我的jQuery插件参数没有正确启动,遇到了问题
- document.open/document.write没有正确地清除chrome中的文档——这是chrome的错误吗
- Javascript-window.open()弹出窗口大小问题
- 使用 window.open in JavaScript 的 URL 中的“/”问题
- 当使用 window.open() 打开 PDF 时,在 IE 中 window.closed 的问题
- window.open 在 Firefox 上遇到了问题
- SPGridView字段-javascript:window.open问题
- window.open浏览器在Firefox和Chrome中的问题
- 在Internet Explorer中设置window.open()的HTML会产生奇怪的样式问题
- JavaScript窗口.Open _self问题
- window.open命令出现问题
- 我遇到了window.open()问题
- firefox调用window.open时出现问题
- Facebook Open Graph API调用问题需要一个活动访问令牌