可能重复:
如何更改 javascript 警报按钮的样式?
只是想知道是否有任何方法来设置弹出框的样式?
“更新”
这是创建警报的实际代码。如果我使用 jQuery 对话框,那么代码的形式是什么?我的意思是如何使用这段代码插入 jQuery 的代码?谢谢
<?php
// Start YOURLS engine
require_once( '../y/includes/load-yourls.php' );
function selfURL() { $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; $protocol = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; $port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); return $protocol."://".$_SERVER['SERVER_NAME'].$port.$_SERVER['REQUEST_URI']; } function strleft($s1, $s2) { return substr($s1, 0, strpos($s1, $s2)); }
?>
<?php
// Part to be executed if FORM has been submitted
if ( isset($_REQUEST['url']) ) {
$url = yourls_sanitize_url( $_REQUEST['url'] );
$return = yourls_add_new_link( $url );
$shorturl = isset( $return['shorturl'] ) ? $return['shorturl'] : '';
echo "<script type='text/javascript'>alert('$shorturl')</script>";
// Part to be executed when no form has been submitted
}
$site = YOURLS_SITE;
$var = selfURL();
?>