<object id="page" type="text/html"
data="index_test.html"
width="565" height="500">
<p>Oops! That didn't work...</p>
</object>
Run Code Online (Sandbox Code Playgroud)
这就是我在Firefox中的工作原理,但是IE7有滚动条.我怎么摆脱他们?
我有这个jQuery函数:
$(this).change(function(){
alert('I changed. ID: ' + $(this).attr("id"));
});
Run Code Online (Sandbox Code Playgroud)
我需要触发警报,除非 id名称结束-0.我想我应该使用$=运营商.我无法弄清楚如何让它发挥作用.
$('.updateDescriptionProduct').click( function() {
if ( updateProductDescription(productID, description) == 'true') {
alert('success!');
} else {
alert('did not update');
}
});
function updateProductDescription(productID, description) {
$.ajax({
url: '/index.php/updateProductDescription',
global: false,
type: 'POST',
data: ({productID: productID, description: description}),
dataType: 'html',
async:false,
success: function(msg){
alert(msg);
return msg;
}
});
}
Run Code Online (Sandbox Code Playgroud)
函数本身说的是真的,但我的click事件又回来了undefined.
我的设计中有一个空的无序列表.现在我想在ul元素中添加以下内容:
<li>
<div class="item left">
<div class="wrap">
<h2>Test Header1</h2>
<p>Test Copy</p>
<p><a class="button" href="#">Click here</a></p>
</div>
<img src="images/bubble.jpg" width="248" height="211" class="right" />
</div>
</li>
Run Code Online (Sandbox Code Playgroud)
使用setInterval,我想在li元素中附加另一个元素/内容ul而不删除第一个li添加的元素/内容.我如何使用jQuery实现这一目标?
我正在寻找页面的HTML搜索一些文本,然后用jQuery选择它所属的元素.遗憾的是,元素没有唯一的ID.