这是我在表格中的tr:
<tr id="mlevel" class="__tr_class__" onclick="needFunction()">
<td class="checkbox"><input type="radio" name="membership" id="__ID__" value="__ID__" /></td>
<td class="icon"><img src="__Icon__" width="60" height="60"/></td>
<td class="name"><h2>__Name__</h2></td>
<td class="price"><h4>__Price__ for __Days__ Days</h4></td>
<td class="auto"><h4>__Auto__</h4></td>
<td class="auto"><h4>__Active__</h4></td>
</tr>
Run Code Online (Sandbox Code Playgroud)
当我点击tr时,我想要选择无线电输入.我想使用jquery或简单的东西.只是不确定要走哪条路.有谁知道这样做的简单功能?
我希望在此自定义函数完成后重新加载窗口:
<script type="text/javascript">
$(document).ready(function(){
setTimeout(function () {
$('#order_form').dolPopupHide({});
}, 3000);
//window.location.reload();
});
</script>
Run Code Online (Sandbox Code Playgroud)
有没有办法可以将重新加载添加到setTimeout函数中,因此在超时结束之前它不会运行?
我有两个数组:
aid = [$aid]=>1
amount = [$aid] = $70
Run Code Online (Sandbox Code Playgroud)
如何将这两个单独的数组重写为一个数组:
payout = [aid] => $aid, [amount] => $70
Run Code Online (Sandbox Code Playgroud) 我需要一种正确的方法来编写一个简单的WHERE,AND,OR语句.这个不起作用:
SELECT `content`
FROM `bx_wall_events`
WHERE `type` = 'wall_common_text'
OR `type` = 'wall_common_fb'
OR `type`= 'wall_common_tw'
AND `owner_id`='{$iId}'
ORDER BY `date` DESC
LIMIT 1
Run Code Online (Sandbox Code Playgroud) 在循环访问数据库中的一些返回数据时,我终于得到了一些工作.有人可以解释一下这件事是如何起作用的吗?我只是想明白为什么这样有效,没有别的.
我特别想知道脚本的这些部分:
($i % $rewardsPerRow == 0)
$i += 1;
($i % $rewardsPerRow == $rewardsPerRow - 1)
Run Code Online (Sandbox Code Playgroud)
这是功能
function displayAvailableRewards() {
$sql = db_res("SELECT * FROM `aaa_rewards_list`");
$rewardsPerRow = '3';
$sCode = '<table>';
if (mysql_num_rows($sql) > 0 ) {
$i = 0;
while ($row = mysql_fetch_array($sql)) {
extract($row);
if ($i % $rewardsPerRow == 0) {
$sCode.= '<tr>';
}
$sCode.= '<td width="200" align="center">';
$sCode.= $row['name'].'<br/>';
$sCode.= '<img src="http://www.huddletogether.com/projects/lightbox2/images/image-2.jpg" height="25" width="35" border="0"><br/>';
$sCode.= $row['desc'].'<br/>Points : '. $row['point_value'];
$sCode.= '</td>';
if ($i % …Run Code Online (Sandbox Code Playgroud) 我想知道如何删除任何数字项后面的特定数字,如6.你有什么东西在PHP中可以做到吗?或者它是一个需要编写的自定义函数
这些var声明实际上在PHP类中做了什么:
class VbForumsPageMain extends BxDolPageView {
var $_oMain;
var $_oTemplate;
var $_oConfig;
var $_oDb;
function VbForumsPageMain(&$oMain) {
$this->_oMain = &$oMain;
$this->_oTemplate = $oMain->_oTemplate;
$this->_oConfig = $oMain->_oConfig;
$this->_oDb = $oMain->_oDb;
parent::BxDolPageView('vb_forums_main');
}
}
Run Code Online (Sandbox Code Playgroud)
它们是否必要,是否为变量添加了额外的用途?我不确定他们是否在课堂上两次.
我基本上需要找到一种方法来查看最有序的产品,然后返回前5个'post_id'的数组.
这是包含产品详细信息的不同订单的数组:
Array
(
[1] => Array
(
[post_id] => 1
[post_ident] => macbook_pro
[post_name] => Macbook Pro
[post_parent_ident] => rings
[post_cat_ident] => default
[post_module_ident] => store
[post_price] => 999.00
[post_currency] => EUR
[item_link] => index.php?module=store&show=post&category=default&parent=rings&post=macbook_pro
[qty] => 1
)
)
Array
(
[1] => Array
(
[post_id] => 1
[post_ident] => macbook_pro
[post_name] => Macbook Pro
[post_parent_ident] => rings
[post_cat_ident] => default
[post_module_ident] => store
[post_price] => 999.00
[post_currency] => EUR
[item_link] => index.php?module=store&show=post&category=default&parent=rings&post=macbook_pro
[qty] => 1
)
) …Run Code Online (Sandbox Code Playgroud) 我需要找出如何在post函数之外访问"data"变量.这将返回valid或invalid这样我就可以完成主要功能的逻辑.
这是正确的方法:
$('#form_choose_methods').submit(function(){
var voucher_code = $('#voucher_code').val();
var check = $.post(baseURL+"ajax.php", { tool: "vouchers", action: "check_voucher", voucher_code: voucher_code },
function(data) {
});
alert(check);
return false;
});
Run Code Online (Sandbox Code Playgroud)
check 似乎是对象,但我想知道如何访问它的结果.