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