gpt4 book ai didi

javascript - 如何使链接编辑codeigniter

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

我在 codeigniter 中有一些脚本,但我对在这里进行链接编辑和删除感到困惑,因为在一个变量中。请告诉我...

	$edit 	= '<a data-uk-tooltip title="Edit" class="md-btn md-btn-warning md-btn-mini md-btn-wave-light waves-effect waves-button waves-light" href="javascript:void(0)"><i class="uk-icon-pencil uk-icon-small"></i></a>';
$delete = '<a data-uk-tooltip title="Delete" class="md-btn md-btn-danger md-btn-mini md-btn-wave-light waves-effect waves-button waves-light" href="javascript:void(0)"><i class="uk-icon-trash uk-icon-small"></i></a>';

最佳答案

我的理解是这个结论

<?php
echo $edit = '<a data-uk-tooltip title="Edit" class="md-btn md-btn-warning md-btn-mini md-btn-wave-light waves-effect waves-button waves-light" href="javascript:void(0)" id="1" onclick="deleteData(this.id)"><i class="uk-icon-pencil uk-icon-small"></i>Edit</a>';
echo $delete = '<a data-uk-tooltip title="Delete" class="md-btn md-btn-danger md-btn-mini md-btn-wave-light waves-effect waves-button waves-light" href="javascript:void(0)" id="1" onclick="editData(this.id)"><i class="uk-icon-trash uk-icon-small"></i>Delete</a>';

?>

<script type="text/javascript">
function deleteData(id) {
alert(id);
//delete data with ajax call
}
function editData(id) {
alert(id);
//edit data with ajax call
}
</script>

    function deleteData(id) {
alert(id);
//delete data with ajax call
}
function editData(id) {
alert(id);
//edit data with ajax call
}
<a data-uk-tooltip title="Edit" class="md-btn md-btn-warning md-btn-mini md-btn-wave-light waves-effect waves-button waves-light" href="javascript:void(0)" id="1" onclick="deleteData(this.id)"><i class="uk-icon-pencil uk-icon-small"></i>Edit</a>
<a data-uk-tooltip title="Delete" class="md-btn md-btn-danger md-btn-mini md-btn-wave-light waves-effect waves-button waves-light" href="javascript:void(0)" id="1" onclick="editData(this.id)"><i class="uk-icon-trash uk-icon-small"></i>Delete</a>

关于javascript - 如何使链接编辑codeigniter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44015182/

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