<a id="a_tbnotesverbergen" href="#nothing">mark picked</a>
答案 0 :(得分:1)
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#a_tbnotesverbergen").click(function(){
$(this).text('tesxt Changed!!!!');
});
});
</script>
</head>
<body>
<a id="a_tbnotesverbergen" href="#nothing">mark picked</a>
</body>
</html>
答案 1 :(得分:0)
试试这个
$("#a_tbnotesverbergen").text("mark delivered");
答案 2 :(得分:0)
如果你想在某个地方做这个,我尝试使用那个锚标记onclick。试试这个
$(&#34;#a_tbnotesverbergen&#34;)。text(&#34;标记已发送&#34;);
$('#a_tbnotesverbergen').click(function(){
$("#a_tbnotesverbergen").text("mark delivered");
});
&#13;
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a id="a_tbnotesverbergen" href="#nothing">mark picked</a>
&#13;
答案 3 :(得分:0)
$(".waves-effect3").click(function() {
var addressValue = $(this).attr("id");
var oid = $(this).attr("name");
});
alert(oid);
$.ajax({
type: 'POST',
url: 'updategoingorder.php',
data: {'id': addressValue, 'name': oid},
success: function(){
alert("Status Updated!!!");
}
});
});
&#13;
<td><a href="#" class="waves-effect3" id="ajax"><i class="fa fa-check"></i><span>Mark Picked</span></a><br>';
&#13;
我想在点击链接时更改标记为href文本中的标记,并将此值发布到updategoingorder.php页面
答案 4 :(得分:0)
这些值已经发送到updategoingorder.php了, 您可以在updategoingorder.php文件中使用它来访问它们
$addressValue= $_POST['id'];
$name= $_POST['name'];
echo $addressValue + $name;
$(".waves-effect3").click(function() {
var addressValue = $(".waves-effect3 span").attr("id");
$(".waves-effect3 span").text("mark delivered");
var oid = $(".waves-effect3 span").text();
alert(oid);
$.ajax({
type: 'POST',
url: 'updategoingorder.php',
data: {'id': addressValue, 'name': oid},
success: function(){
alert("Status Updated!!!");
}
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<td><a href="#" class="waves-effect3" id="ajax"><i class="fa fa-check"></i><span>Mark Picked</span></a><br>
答案 5 :(得分:-1)
请试试这个
$(&#34;#a_tbnotesverbergen&#34;)。attr(&#34; href&#34;,&#34;标记已发送&#34;);