Javascript ÔÚ HTML Ò³Ãæ¹â±ê´¦ÊäÈë×Ö·û
insertAtCurson º¯Êý´úÁ½²ÎÊý·Ö±ðΪ¶ÔÏóºÍÊäÈëµÄ×Ö·û
function insertAtCursor(myField, myValue)
{
if (document.selection)
{
myField.focus();
sel = document.selection.createRange();
sel.text = myValue;
}
else if (myField.selectionStart || myField.selectionStart == "0")
{
var startPos = myField.selectionStart;
var endPos = myField.selectionEnd;
myField.value = myField.value.substring(0, startPos) + myValue + myField.value.substring(endPos, myField.value.length);
}
else
{
myField.value += myValue;
}
}
Ïà¹ØÎĵµ£º
ÔÚ¿ª·¢¹ý³ÌÖо³£Óöµ½Òªµ÷ÕûСÊýµÄ¸ñʽ£¬Èç±£ÁôСÊýµãºóÁ½Î»µÈµÈ¡£·½·¨Ò²ÆÄΪ³£¼û£¬±¸ÍüÈçÏ¡£
µÚÒ»ÖÖ£¬ÀûÓÃmath.round
var original=28.453
1) //round "original" to two decimals
var result=Math.round(original*100)/100; //returns 28.45
2) // round "original" to 1 dec ......
1 Add the following code to .aspx
<script>
function fresh() {
{
window.opener.document.getElementById("ControlId").click(); //ControlId -- ......
ͻȻ¼äÏëÈ¥ÏÂÊ×fire in the holeµÄÁåÉù£¬ÓÚÊÇÓÃsosoÕÒÁËһϣ¬½øÈëÁËÊÖ»úÀÖÔ° £¨http://download.shouji.com.cn/do/wave?html=&inputname=wave&wname=Fire+in+the+hole+&thsubmit=%E6%90%9C%E7%B4%A2£©£¬Ñ¡Ôñfire in the hole£¬µ¯³ö¸ö´°¿Ú£¬ÌáʾÈÃÊäÈëÊÖ»úºÅÂë¡£ÔÎËÀ£¬²»¾ÍÏÂÊ׸èÂ»¹²»ÈÃÖ±½ÓÏ¡£ºÇºÇ£¬·¢Ï ......
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" CssClass="tablecss">
<Columns>
<asp:TemplateField HeaderText="񅧏" HeaderStyle-CssClass="aaa" ItemStyle-CssClass="bbb">
<ItemTemplate>
<%#Eval(" ......
·½Ê½Ò»£º »ò ×÷»»Ðзû
·½Ê½¶þ£ºÖ±½ÓÔÚÔ´ÂëÖÐÇûسµ
¡¾½¨Òé¡¿ ²ÉÓ÷½°¸Ò»¡£
¡¾Ô´Âë¡¿
<a href="#" title="µÚÒ»ÐÐ µÚ¶þÐÐ µÚÈýÐÐ">·½Ê½Ò»£ºÊó±ê·ÅÔÚÎÒÉÏÃæ¿´Ò»ÏÂtitle</a>
<br />
<br />
<a href="#" title="µÚÒ»ÐÐ
µÚ¶þÐÐ
µÚÈýÐÐ">·½Ê½¶þ£ºÊó± ......