我有两个表,想要查询.我试图在A桌上获得AA队和BB队的形象基础.
我用了:
SELECT tableA.team1, tableA.team2, tableB.team, tableB.image,
FROM tableA
LEFT JOIN tableB ON tableA.team1=tableB.team
Run Code Online (Sandbox Code Playgroud)
结果只显示列上的imageA.有没有办法在不使用第二个查询的情况下选择imageA和图像B?我感谢任何帮助!非常感谢!
我的表结构是:
表A.
team1 team2
------------
AA BB
Run Code Online (Sandbox Code Playgroud)
表B.
team image
-------------
AA imagaA
BB imageB
Run Code Online (Sandbox Code Playgroud) 我正在尝试向下拉菜单选项添加滚动条,因此当用户单击菜单时,它将不会一直显示所有选项.我试过了
<select name='menu'>
<option value='1'>first item</option>
<option value='2'>second item</option>
<option value='3'>third item</option>
<option value='4'>fourth item</option>
<option value='5'>fifth item</option>
<option>........
<option>........
//I have many options.....
</select>
Run Code Online (Sandbox Code Playgroud)
我尝试这个css但它只适用于菜单本身,而不是选项.
select {
height:50px;
overflow-y: scroll;
}
Run Code Online (Sandbox Code Playgroud)
有什么想法吗?非常感谢.
我有一个关于检查的问题string.
该string是从ckeditor这样用户可以输入任何东西.
该variable名称是htmlData,它是这样的:
test here<br />
<table border="1" cellpadding="1" cellspacing="1" style="width: 500px;">
<tbody>
<tr>
<td>
111</td>
<td>
222</td>
</tr>
<tr>
<td>
333</td>
<td>
444</td>
</tr>
<tr>
<td>
555</td>
<td>
666</td>
</tr>
</tbody>
</table>
<br />
second test
Run Code Online (Sandbox Code Playgroud)
我想检测用户是否添加了一个table结构,我试过了
if(htmlData.indexOf('</table>').length > -1){
console.log('table detected')
}
Run Code Online (Sandbox Code Playgroud)
但它没有显示我的任何东西console.任何人都可以暗示这一点吗?
非常感谢!
我试图检测所选元素是否仅包含.
例如:
if('td').is(':empty'){
//do something...
}
Run Code Online (Sandbox Code Playgroud)
如果<td><td>不是,上述代码将起作用<td> </td>.
筛选出来的最佳方法是 什么?
我想在CSS工作表中简化我的css选择器
我有类似的东西
.table_test .div, .table_name .div, .table_company .div{
color:black;
}
.table_test .div table input, .table_name .div table input{
color:red;
}
Run Code Online (Sandbox Code Playgroud)
我的HTML就像
<div class='table_test'>
<div class='div'>......
<table>
<tr>
<td><input>...</td>
</tr>
</table>
</div>
<div class='table_name'>
<div class='div'>......
<table>
<tr>
<td><input>...</td>
</tr>
</table>
</div>
Run Code Online (Sandbox Code Playgroud)
我觉得有很多选择器聚集在一起,并想知道是否有办法使它更简单.谢谢您的帮助!
我正在尝试设置包含ul的子菜单的菜单.我的问题是如何删除从菜单ul继承的子ul菜单背景图像.我感谢任何帮助.非常感谢!
我的HTML
<ul id="menuBar">
<li id="test1">test1</li>
<li id="test2"><a href="#">Pro1</a>
<div class="subMenu">
<ul>
<li><a href="#">sub1</a></li> //all li a would get the same
//backgroundimage btForTest2.jpg
// butI just want a clean background
<li><a href="#">sub2</a></li>
<li><a href="#">sub3</a></li>
</ul>
<ul>
<li><a href="#">Volleyball</a></li>
<li><a href="#">Walking</a></li>
<li><a href="#">Water Shoes</a></li>
</ul>
</div> <!--end of submenu-->
</li>
</ul>
Run Code Online (Sandbox Code Playgroud)
CSS:
#menuBar #mens a{
background:url("../images/btForTest2.jpg") no-repeat;
display:block;
border-right:1px solid #ffffff;
width:112px;
height:37px;
}
.subMenu li a{
list-style:none;
margin: 0;
padding: 5px;
width: 200px; //width is 112px not 200 px
float: …Run Code Online (Sandbox Code Playgroud) 我想弄清楚$a=&$b和之间的区别$a=$b.我知道&将变量作为参考变量.但是下面的测试给了我相同的结果.有人可以解释这个区别吗?谢谢.
$a=5;
$b=6;
$a=&$b;
echo $a; //6
$a=5;
$b=6;
$a=$b;
echo $a; //6
Run Code Online (Sandbox Code Playgroud) 我试图在鼠标悬停时放大图像,并在mouseout后缩小尺寸.我有以下内容:
$('#image img').live("mouseover", function(){
var $this=$(this);
$this.attr('width','25%');
$this.attr('height','25%');
})
Run Code Online (Sandbox Code Playgroud)
放大部分工作正常,但我不知道如何减小鼠标后的大小.此外,我认为我的代码有点难看,不知道如何解决它.非常感谢.
我想在Jquery中获取表格html.
我有以下内容:
<table id='table' border='1'>
<tr><td>items...</td><td>items2...</td></tr>
<tr><td>items...</td><td>items2...</td></tr>
<tr><td>items...</td><td>items2...</td></tr>
<tr><td>items...</td><td>items2...</td></tr>
</table>
Run Code Online (Sandbox Code Playgroud)
我有
var test = $('#table').html()
Run Code Online (Sandbox Code Playgroud)
但当我得到console.log(测试)时
<tr><td>items...</td><td>items2...</td></tr>
<tr><td>items...</td><td>items2...</td></tr>
<tr><td>items...</td><td>items2...</td></tr>
<tr><td>items...</td><td>items2...</td></tr>
Run Code Online (Sandbox Code Playgroud)
没有<table>标签.
有没有什么办法解决这一问题?非常感谢!
我试图将我的plugin.js脚本中的变量传递给我的customTag.js脚本.
我有以下内容:
plugin.js
//I want to pass id from my plugin.js to my customTag.js
CKEDITOR.plugins.add('customTag',
{
init : function(editor){
var pluginName = 'customTag';
var id = editor.config.id;
CKEDITOR.dialog.add(pluginName, this.path + 'dialogs/customTag.js');
editor.addCommand(pluginName, new CKEDITOR.dialogCommand(pluginName));
editor.ui.addButton('customTag', { label : 'customTag', command : pluginName });
}
}
);
Run Code Online (Sandbox Code Playgroud)
在我的customTag.js中
( function(){
codes...
console(id) // gives me error.
})();
Run Code Online (Sandbox Code Playgroud)
有人可以帮我解决这个问题吗?
谢谢!
html ×4
jquery ×4
css ×3
ckeditor ×2
javascript ×2
php ×2
command ×1
fckeditor ×1
html-lists ×1
inheritance ×1
mysql ×1
operators ×1
scroll ×1
variables ×1