www.un.org/Depts/DGACM/index_spanish.htm 问题
I m试图获取内容,带上标签,但我不能让它工作。
www.un.org/Depts/DGACM/index_spanish.htm 准则是什么?
我使用j Query,并试图用文字()和(html)获得风格的内容。 它不可行。
www.un.org/Depts/DGACM/index_spanish.htm 我的代码
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet/less" type="text/css" href="css/style.less">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js" type="text/javascript"></script>
<style id="less:concepts-less-css-style" media="screen" type="text/css">
body {
padding: 10px;
background: blue;
}
</style>
</head>
<body>
<script src="js/less-1.1.5.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
var my_id = $( style ).attr( id );
var test = $( #less:concepts-less-css-style ).text();
var test2 = $( #less:concepts-less-css-style ).html();
alert(test + "#" + test2 + "#" + my_id);
});
</script>
</body>
</html>