JSON.stringify()を使う
ajaxで渡すパラメータに配列を指定したい場合、JSON.stringifyで文字列に変換します.
$.ajax({
type: "POST",
url: "http://hogehoge/",
data: {
text: JSON.stringify([someString,"test"]),
},
success: foobarFun
})
<div id="blogparts"></div>
<script type="text/javascript">
var currentScript = (
function (e) {
if(e.nodeName.toLowerCase() == 'script')
return e;
return arguments.callee(e.lastChild)
}
)(document);
function createIframe() {
var frame = document.createElement("iframe");
frame.src = "作成するiframeのsrcを指定";
frame.width = 180;
frame.height = 245;
frame.scrolling = "no";
//document.body.insertBefore(frame, currentScript);
var targetNode = document.getElementById('blogparts');
targetNode.parentNode.insertBefore(frame, currentScript);
}
window.onload = function(){
createIframe();
}
</script>
activity indicatorのjavascriptを修正する
- document.styleSheets[0].insertRule(rule);
+ document.styleSheets[0].insertRule(rule, document.styleSheets[0].cssRules.length);