在搜索文本时,它会找到并突出显示正确的文本,但是其他元素会被清除,如<p>、<ul>、<b>、<strong>。所有的元素都会被移除/清理!
<div class="ray-search">
<div class="field" id="ray-search-form">
<input type="text" id="searchfor" placeholder="what are you searching for
<!DOCTYPE html>
...
<style scoped>
/* css */
</style>
w3.org验证器给出了这个错误:
Line 883, Column 17: Element style not allowed as child of element body in this context.
(Suppressing further errors from this subtree.)
<style scoped>...
Contexts in which element style may be us
我有一个类似于这个的简单的HTML页面,这是它的HTML代码
<!DOCTYPE html>
<html>
<body>
<h1>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Tincidunt a gravida non, tincidunt condimentum nullam.
Aliquam mi augue, venenatis sed dolor eget. Aliquam venenatis felis, nullam ante est, nullam matt
我想让“图片上传脚本”。我不想使用input元素。当单击红色图像时,将出现系统窗口,您可以选择图像文件。但它在IE 9中不起作用。
jQuery代码:
// this part of code does not work in IE9
$('img').click(
function(){
$('#photoimg').trigger('click');
});
// this works fine
$('#photoimg').live('change', function(){
$
我需要从"p“元素中获取值,我用jQuery绘制这个"p”,它是可以的,然后我有一个按钮,当我点击它时,我想显示来自"p“元素的值,但是我没有任何信息,下面是一个简单的代码示例:
$(document).ready(function() {
$('#c').click(function() {
var p = $('#p1').val();
alert(p);
});
draw();
});
function draw() {
var html = "";
html +=