【发布时间】:2017-07-27 18:01:15
【问题描述】:
我对编码完全陌生。因此寻求帮助以仅“检查”复选框以“无法找到字符”回显。我怀疑它是某种 if/else 语句,但经过多次试验和错误,我最终检查了所有复选框(这是不正确的)。非常迷茫……所以我在这里向专家寻求您的指导。附上我怀疑的相关原文,供各位专家指教,非常感谢:
echo '<tr>';
echo '<th valign="top" class="label" scope="row">';
echo '<input type="checkbox" class="chkLink alignleft">';
echo '<span class="alignleft"><label for="cartoon">';
_e('Source URL', 'cartoon');
echo '</label></span>';
echo '<span class="alignright"><abbr class="required" title="required">*</abbr></span>';
echo '</th>';
function cartoon_we_fetch_names_callback() {
$url = CARTOON_EMBED_IMP_UTILITIES::globalRequest('cartoon_we_url');
$html = cartoon_file_get_html($url);
if(!$html) {
echo '<div class="error notice-error notice-alt">Unable to find Character</div>';
wp_die();
}
$names = $html->find('#names > ul', 0);
if(!$names) {
echo '<div class="error notice-error notice-alt">Unable to find Character</div>';
wp_die();
}
foreach ($names->find('.namesnumber') as $e) {
$e->outertext = '<input type="checkbox">' . $e->outertext;
}
foreach($names->find('a') as $link){
if($link->href) {
$id = split('#', $link->href);
$id = $id[1];
$link->href = 'javascript:void(0);';
$link->outertext = $link->innertext;
$link->dataTarget = $id;
$link->parent()->datatarget = $id;
}
}
【问题讨论】:
-
感谢@J.chomel。你能给我建议吗?