我是完全新的編碼。所以只有在複選框'檢查'找不到'字符'迴應時尋求幫助。我懷疑它的一些if/else類型的陳述,但經過多次試驗和錯誤,我最終檢查了所有複選框(這是不正確的)。非常失落......所以我在這裏向這裏的專家尋求您的指導。附我懷疑下面的任何專家的意見,有關原線路,非常感謝你:'勾號'複選框在php wordpress
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。你能給我建議嗎? –