iphone Safari浏览器无法跳转,如何解决问题?
<inputtype="text"class="form-control"id="checkContent"aria-label="..."autocomplete="o...
<input type="text" class="form-control" id="checkContent" aria-label="..." autocomplete="off" ">
<form id="code" action="http://XXXX" method="post" target="_blank">
<input type="hidden" name="jsonString" id="jsonString" value=''>
<input type="hidden" name="sign" id="sign" value="">
<button type="button" id="checkBtn" οnclick="checkData()" style="position:absolute;border:none;;"></button>
</form>
function checkData() {
var searchInput = $(".form-control").val();
var typeContent = $('button .type').text();
var words = searchInput.split(' ');
var searchKeywords = '';
for (var i = 0; i < words.length; i++) {
if (i === words.length - 1) {
searchKeywords += encodeURI(words[i]);
} else {
searchKeywords += encodeURI(words[i]) + '+';
}
}
var type;
if (typeContent === "XX") {
type = "1";
} else {
type = "2";
}
if (searchInput === '' || $.trim(searchInput) === "" || searchInput === '文字' ) {
Dialog.alert("文字!");
return false;
} else {
var dc = { type: type, keywords: searchKeywords };
Server.sendRequest("search/query", dc, function (response) {
$("#jsonString").val(response.jsonString);
$("#sign").val(response.sign)
$("#code").submit();
});
}
}
苹果手机端跳转不过去,如何改,电脑端可以正常跳转的 展开
<form id="code" action="http://XXXX" method="post" target="_blank">
<input type="hidden" name="jsonString" id="jsonString" value=''>
<input type="hidden" name="sign" id="sign" value="">
<button type="button" id="checkBtn" οnclick="checkData()" style="position:absolute;border:none;;"></button>
</form>
function checkData() {
var searchInput = $(".form-control").val();
var typeContent = $('button .type').text();
var words = searchInput.split(' ');
var searchKeywords = '';
for (var i = 0; i < words.length; i++) {
if (i === words.length - 1) {
searchKeywords += encodeURI(words[i]);
} else {
searchKeywords += encodeURI(words[i]) + '+';
}
}
var type;
if (typeContent === "XX") {
type = "1";
} else {
type = "2";
}
if (searchInput === '' || $.trim(searchInput) === "" || searchInput === '文字' ) {
Dialog.alert("文字!");
return false;
} else {
var dc = { type: type, keywords: searchKeywords };
Server.sendRequest("search/query", dc, function (response) {
$("#jsonString").val(response.jsonString);
$("#sign").val(response.sign)
$("#code").submit();
});
}
}
苹果手机端跳转不过去,如何改,电脑端可以正常跳转的 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询