George_Fal 2015-07-26 11:50 采纳率: 0%
浏览 9

Grunt JS-Ajax的助手

i have a code like this

index.js

var content = ['a', 'b', 'c', 'f'];
var $body = $(document.body);
var c = '';
for (var i = 0; i < content.length; i++) {
   c += '<div>' + content[i] + '</div>';
}

$body.append(c);

index.html

<html>
<head>
  <script src="index.js"></script>
</head>
<body>
</body>

can I automate this process? And Build a index.html with contents?

  • 写回答

0条回答 默认 最新

    报告相同问题?