我在我的一个表(html表元素)单元格中有一个大的URL(没有空格)调整表格大小.我不想调整表的大小,我应该设置什么属性来将URL分解为新行?
HTML
<table class="ui-grid" cellspacing="0" rules="all" border="1" id="MainContent_gvStatistic" style="border-collapse:collapse;">
<caption>Statistic (Last 50 conversions)</caption>
<tbody><tr>
<th scope="col">Date</th>
<th scope="col">Result</th>
<th scope="col">Api</th>
<th scope="col">IP</th>
<th scope="col">Source</th>
</tr><tr>
<td style="width:200px;">12/16/2011 3:23:59 PM</td>
<td align="center" style="width:50px;">True</td>
<td align="center" style="width:100px;">Web2Pdf</td>
<td align="center" style="width:100px;">::1</td>
<td style="width:200px;">http://a1.quickcatchlabs.com/phototemplates/football_blimp_1.html?i_url=http%3A//lh3.ggpht.com/yf5lVBB_WNBvBHT1HoIzY1SG0-PY5zRCobP3vBacuSk9N346F7CeAIRSFOltR6ZC1-yf-MNKAcAd7bAZ_A%3Ds612-c&i_name=Patriots%20%20vs%20Redskins&i_venue_name=Gillette%20Stadium%20&i_venue_address=Foxborough%20%2C%20MA&d_Score_0=34&d_Score_1=27&d_Period_0=Final&p_name_0=Patriots%20&p_name_1=Redskins</td>
</tr>
</tbody></table>
Run Code Online (Sandbox Code Playgroud)
CSS
.ui-grid { width: 100%; margin: 5px 0 10px 0; border: solid 1px #eeeeee; border-collapse: collapse; }
.ui-grid td { padding: 2px; border: solid 1px #eeeeee; }
.ui-grid td b { font-weight: bold; }
.ui-grid th { padding: …
Run Code Online (Sandbox Code Playgroud) 我有这个 jQuery 代码:
var thumb = $($('#slider').children('.ui-slider-handle'));
setLabelPosition();
$('#slider').bind('slide', function (event, ui) {
$('#boksTimer').html((((ui.value) / 31) * 60).toFixed(0) + ' min pr. dag');
setLabelPosition();
});
function setLabelPosition() {
var label = $('#boksTimer');
label.css('top', '10px');
label.css('left', thumb.position().left - (label.width() - thumb.width())/ 2);
}
var thumb2 = $($('#slider2').children('.ui-slider-handle'));
setLabelPosition2();
$('#slider2').bind('slide', function (event, ui) {
$('#boksTimer2').html((((ui.value) / 31) * 60).toFixed(0) + ' min pr. dag');
setLabelPosition2();
});
function setLabelPosition2() {
var label2 = $('#boksTimer2');
label.css('top', '10px');
label.css('left', thumb2.position().left - (label2.width() - thumb2.width())/ 2); …
Run Code Online (Sandbox Code Playgroud) 如何只重新加载一次HTML基本网页?我在body标签中使用history.go(0);
函数onLoad
,但我只想运行一次.请记住我正在使用,iframe
因此无法使用以下类型代码:
<script language=" JavaScript" ><!--
function MyReload()
{
window.location.reload();
}
//--></script>
<Body onLoad=" MyReload()" >
Run Code Online (Sandbox Code Playgroud)
上面的代码对我不起作用
但下面的代码工作正常,但问题是我需要加载一次
<BODY BGCOLOR=#FFFFFF background="../images/Index_04.jpg" onLoad="history.go(0)" >
Run Code Online (Sandbox Code Playgroud)
注意:我在用户点击主页链接时使用2个iframe,在iframe中加载页面比我想用当前iframe页面重新加载整个页面.
我有以下JavaScript代码:
<script type='text/javascipt' language="javascript">
function getUserLoc() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(displayResult, displayError);
}
else {
setMessage("Geolocation is not supported by this browser");
}
}
function displayResult(position) {
setMessage("Latitude: " + position.coords.latitude + ", Longitude: " + position.coords.longitude);
}
function setMessage(msg) {
document.forms[0].myLoc.value = msg;
}
function displayError(error) {
var errors = { 1: 'Permission denied', 2: 'Position unavailable', 3: 'Request timeout' };
setMessage("Error occured: " + errors[error.code]);
}
</script>
Run Code Online (Sandbox Code Playgroud)
和ASP.NET一样:
<asp:Button ID="LoginButton" runat="server" Text="Log In" ValidationGroup="LoginUserValidationGroup"
OnClientClick="getUserLoc( )" />
Run Code Online (Sandbox Code Playgroud)
但是,当我单击"LoginButton"时,我收到JavaScript错误: …
javascript ×3
html ×2
asp.net ×1
c# ×1
couchdb ×1
css ×1
html-table ×1
iframe ×1
jquery ×1
redis ×1