gpt4 book ai didi

javascript - 单击按钮在一个站点上有效,但在其他站点上无效

转载 作者:行者123 更新时间:2023-11-28 09:09:55 24 4
gpt4 key购买 nike

我有一个用于手动浏览网站的脚本。它是这样工作的。使用任何 URL 缩短网站缩短链接。原始链接和缩短的链接都保存在数据库中。用户单击访问按钮,打开一个 url 缩短链接,然后在按下跳过添加按钮后,用户必须将显示的 url 复制/粘贴到文本框中,然后按确认。如果数据库中的条目匹配,那么我将记入用户。

我面临的问题是,它在某些网站上工作正常,但在其他网站上不起作用。使用相同的脚本。所有站点都具有相同的编码结构。 [我将其安装在付费点击网站]

问题:
我点击访问按钮[它工作正常]
在我复制/粘贴并按下确认按钮后[它不起作用]

我一直按确认按钮,它没有做任何事情。

同样的代码在一些网站上工作得很好。下面是我正在使用的代码......

 <?

$sql2=$Db1->query("SELECT * FROM tablename");
while($temp=$Db1->fetch_array($sql2)) {

{
$linksHTML .= '<div class="smartbox" id="'.$temp['id'].'" style="height: 300px; width: 270px; background: #F3F4F4; border: 5px solid #36A6CB; border-radius: 12px; float: left; position: relative; padding: 6px; margin: 8px 8px 0 0;">
<center>
<div class="title"> <a style="color:blue;"> <b> '.$temp['title'].' </b></a> [ Click Visit, Press Skip Add,Paste URL below and press confirm ] </div>
<div><font color="green">Cash: <b>$'.$temp['credits'].'</b></font></div>
<div class="clearer">&nbsp;</div>

<div><input class="button" value="Visit" style="background: #409940; border-radius: 10px;" type="button" onclick="window.open(\''.$temp['shorten'].'\');"></div>

<br>

<form>
<b>Enter URL :</b>
<input name="link_'.$temp['id'].'" id="link_'.$temp['id'].'" size="16" maxlength="150" value="http://" type="text">
<br><br>
<input id="btn_'.$temp['id'].'" value="Confirm" style="background: #409940; border-radius: 10px; color: white;" type="button" onclick="validaLink(\''.$temp['id'].'\');">
</form>

<br>
</center>
</div>';
}
}
} else { echo "No Links "; }
$includes[content]='<div id="msg_link" style="text-align:center"></div>
<div id="tbl" style="width: 850px; margin: 0 auto">
'.$linksHTML.'
</div>
<div style="clear: both"></div>
<script>
function validaLink(id)
{
$.post(\'checkLink.php?'.$url_variables.'\', {id: id, enlace: $(\'#link_\'+id).val(), sid: \''.$_SESSION['sessid'].'\', sid2: \''.$_SESSION['sessid2'].'\', siduid: \''.$_SESSION['sessiduid'].'\'}, function(data){
if( data == "ok" ) {
$(\'#\'+id).fadeOut();
$(\'#msg_link\').html(\'We added the credits to your account.\');
} else {
alert(data);
}
});
}
</script>
';

?>

这个脚本不是我开发的..我没有与原始开发者联系。

多多支持

最佳答案

把这个写在你的 html 的头部

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>

关于javascript - 单击按钮在一个站点上有效,但在其他站点上无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26545568/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com