更多操作
无编辑摘要 |
无编辑摘要 |
||
第15行: | 第15行: | ||
async:true, | async:true, | ||
success:function(data){ | success:function(data){ | ||
data = $(".ankiContainer",data).html() | |||
$("#randContainer").html(data) | $("#randContainer").html(data) | ||
},error:function(){ | },error:function(){ |
2022年1月12日 (三) 08:45的版本
function insertButton(){
var buttonCintainer = $('<span aria-disabled="false" class=""></span>')
var button = $('<button onclick="insertPage()" id="insertRandom" style="display: block" type="submit" tabindex="0" aria-disabled="false" value="" class="oo-ui-inputWidget-input oo-ui-buttonElement-button"></button>')
var buttonText = $('<span id="randomPicStartButton" class="oo-ui-labelElement-label">随机本页图片</span>')
buttonText.prependTo(button)
button.prependTo(buttonCintainer)
console.log(buttonCintainer.html())
$('#randContainer').prepend(buttonCintainer)
$("#insertRandom").click(function(){
$.ajax({
url:'https://www.medforest.cn/tools/download/',
dataType:'html',
type:'get',
async:true,
success:function(data){
data = $(".ankiContainer",data).html()
$("#randContainer").html(data)
},error:function(){
}
})
})
}
insertButton()